मुख्य सामग्री पर जाएँ
Skillpedia
वेबसाइट और UI (frontend)7.0k · #13653

near-dapp

यह क्या करती है

यह स्किल आपको स्टार्टर टेम्पलेट से नया NEAR वेब ऐप बनाने में मदद करती है, या पहले से मौजूद ऐप में wallet sign-in जोड़ती है। इसमें React hooks वाला तरीका और सादा JavaScript विकल्प शामिल हैं, NEAR पर बनाने वाले वेब डेवलपर्स के लिए।

कब इस्तेमाल करें

  • ✓जब आप टेम्पलेट से नया NEAR वेब ऐप शुरू करना चाहते हों।
  • ✓जब आप मौजूदा React ऐप में NEAR wallet sign-in और contract कॉल जोड़ना चाहते हों।
  • ✓जब आपको सादे JavaScript से NEAR wallet जोड़ना हो।

Skill का लिंक

https://github.com/internet-court/internet-court-skill/blob/main/vendored/near/near-dapp/SKILL.md

इसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।

कैसे इस्तेमाल करें

सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।

पेस्ट करने के लिए तैयार मैसेज

इस skill से मेरी मदद करो: https://github.com/internet-court/internet-court-skill/blob/main/vendored/near/near-dapp/SKILL.md इस लिंक की SKILL.md फ़ाइल पढ़ो और मेरे काम में उसके निर्देशों का पालन करो।
क्या आप चाहते हैं कि आपका AI ऐसी skills खुद ढूँढे?मुफ़्त Skillpedia MCP इंस्टॉल करें: बस एक लाइन, और हर काम से पहले यह 15,000+ skills में खोजता है।1 मिनट में इंस्टॉल करें →

AI से क्या माँगें: उदाहरण

“मैं अपने मौजूदा React ऐप में NEAR wallet sign-in जोड़ना चाहता हूँ।”

हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।

यह कैसे काम करती है

नए प्रोजेक्ट के लिए एजेंट आपके चुने फ़्रेमवर्क और contract भाषा के साथ create-near-app टूल चलाता है। मौजूदा ऐप के लिए वह कनेक्शन पैकेज इंस्टॉल करता है, ऐप को provider में लपेटता है, और sign-in व contract कॉल के लिए hooks इस्तेमाल करता है।

तकनीकी सामग्री (मूल SKILL.md)

लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।

NEAR dApp

Decision Router

Determine which path to follow:

Path A: New Project

User wants to create a new NEAR dApp from scratch.

  1. Read references/create-near-app.md
  2. Run scaffolding:
npx create-near-app@latest

Or with arguments:

npx create-near-app my-app --frontend vite-react --contract rs --install

Framework options: vite-react | next-app | next-page Contract options: rs (Rust) | ts (TypeScript)

  1. If user needs wallet connection in the scaffolded app, also follow Path B.

Path B: Existing Project

User wants to add NEAR wallet connection to an existing React app.

  1. Read references/near-connect-hooks.md — React hooks API and patterns
  2. If user needs low-level wallet API or non-React integration, also read references/near-connect.md

Quick setup:

npm install near-connect-hooks @hot-labs/near-connect near-api-js
// 1. Wrap app root with NearProvider
import { NearProvider } from 'near-connect-hooks';

<NearProvider config={{ network: 'mainnet' }}>
  <App />
</NearProvider>

// 2. Use hook in components
import { useNearWallet } from 'near-connect-hooks';

const { signedAccountId, signIn, signOut, viewFunction, callFunction } = useNearWallet();

Path C: Non-React or Vanilla JS

Use @hot-labs/near-connect directly without React hooks.

  1. Read references/near-connect.md
npm install @hot-labs/near-connect
import { NearConnector } from "@hot-labs/near-connect";

const connector = new NearConnector({ network: "mainnet" });
connector.on("wallet:signIn", async (t) => {
  const wallet = await connector.wallet();
  const address = t.accounts[0].accountId;
});
await connector.connect();

Key Patterns

  • Read contract state (no wallet): viewFunction({ contractId, method, args })
  • Write to contract (wallet required): callFunction({ contractId, method, args, deposit })
  • Transfer NEAR: transfer({ receiverId, amount })
  • NEAR ↔ yoctoNEAR: Use nearToYocto() / yoctoToNear() from near-api-js
  • 1 NEAR = "1000000000000000000000000" yoctoNEAR
  • Default gas: "30000000000000" (30 TGas)
अक्सर पूछे जाने वाले सवाल

स्टार्टर किन फ़्रेमवर्क के साथ आ सकता है?

Vite with React, Next.js app router, या Next.js pages।

कौन-सी contract भाषाएँ सपोर्ट हैं?

Rust और TypeScript।

क्या इसे React के बिना इस्तेमाल कर सकते हैं?

हाँ। स्किल में निचले स्तर की wallet लाइब्रेरी से सादे JavaScript के लिए अलग रास्ता है।

जानकारी

लेखक का मूल विवरण

Build NEAR Protocol dApps. Use for: (1) creating new NEAR dApps with `create-near-app` (Vite+React, Next.js), (2) adding NEAR wallet connection to existing apps with `@hot-labs/near-connect` and `near-connect-hooks`, (3) building frontend UI for NEAR smart contracts, (4) integrating wallet sign-in/sign-out, contract calls, and transaction signing into web applications.

repo: internet-court/internet-court-skill

लोकप्रियता

GitHub स्टार
7.0k
रैंकिंग में स्थान
#13653
लाइसेंस
—
अपडेट की गई
26/10/2026

क्या यह skill काम की है?

0

लॉग इन करें वोट करने के लिए।

कमेंट

  • …

इस repository की और skills

internet-court

7.0k

यह आपके एजेंट को AI एजेंट या पेड सेवा से सुरक्षित तरीके से भुगतान और लेन-देन की शुरुआती दिशा देती है, और सही विशेष गाइड बताती है।

AI और एजेंटएजेंट

genlayer-erc7710-connector

7.0k

यह आपके एजेंट को AI समीक्षा के नतीजे को अनुमति प्रणाली से जोड़ने देती है, ताकि खराब समीक्षा एजेंट की अनुमतियाँ सीमित कर सके।

AI और एजेंटएजेंट

genlayer-intelligent-contracts

7.0k

यह आपके एजेंट को AI जज के नियम, सबूत और नतीजे तय करने में मदद करती है, जो जाँचता है कि दूसरा एजेंट अपने अधिकार के दायरे में रहा या नहीं।

AI और एजेंटएजेंट

x402-erc7710

7.0k

यह आपके एजेंट को हर अनुरोध पर वेब सेवा का भुगतान करने और तय सीमा के भीतर लगातार खर्च करने की व्यवस्था में मदद करती है।

AI और एजेंटएजेंट

मिलती-जुलती skills