cns

द्वारा convex-dev

Convex Name System (CNS) नामों को हल करें या पंजीकृत करें। जब उपयोगकर्ता CNS नाम खोजना, नया नाम पंजीकृत करना, या किसी नाम के लक्ष्य को अपडेट करना चाहे तब उपयोग करें।

npx skills add https://github.com/convex-dev/convex --skill cns

Convex Name System (CNS)

CNS maps human-readable names (like convex.fungible) to on-chain addresses.

See the convex-lisp skill for CVM conventions.

Resolve a Name

In CVM source, @convex.fungible resolves the name directly — this is the normal way to reach a library.

To inspect a name's record (value, controller, metadata, child node), use a Convex MCP server's resolveCNS tool if one is configured. Otherwise query it:

java -jar convex.jar client query '@convex.fungible'

Register or Update a Name

The registry actor is #9, available in CVM code as *registry*. It has no cns-update function — use create for a new name and update for an existing one:

;; Create a new name pointing at a target, with *address* as controller
(*registry*/create 'my.name #TARGET *address*)

;; Update an existing name you control
(*registry*/update 'my.name #NEW-TARGET)

;; Change who controls a name
(*registry*/control 'my.name #NEW-CONTROLLER)

These are transactions (they change state). Notes:

  • Creating requires controlling the parent namespace. (*registry*/create 'my.name ...) needs the my node to exist and to trust you — otherwise it fails with :TRUST "Forbidden to create CNS node". Top-level names require special authority.
  • create also accepts optional controller, metadata and child arguments: (*registry*/create 'my.name target controller metadata).
  • Note (*registry*/register {:name "..."}) is unrelated — it registers metadata for the caller's own account, not a CNS name.
  • The registry also defines change-control, but it is the scoped :callable SPI variant (path taken from *scope*) — not called directly with a symbol; use control.

CNS in Code

  • @convex.fungible in CVM source resolves to the actor address at runtime
  • Use CNS paths instead of hardcoded addresses for portable code
  • (@convex.fungible/balance #TOKEN #USER) calls balance on the resolved actor

Common CNS Names

NamePurpose
convex.fungibleFungible token standard library
convex.trustTrust and access control
convex.assetGeneric asset interface
asset.nft.simpleNon-fungible token standard
asset.multi-tokenMulti-token standard

(Resolve with (*registry*/resolve 'name) to get the current address — these are network-specific.)

convex-dev की और Skills

account
convex-dev
Convex खाते बनाएँ या जाँचें। जब उपयोगकर्ता नया खाता सेट करना चाहे, खाता विवरण देखना चाहे, या कुंजियाँ प्रबंधित करना चाहे, तब उपयोग करें।
account
convex-dev
Convex खाते बनाएँ या जाँचें। उपयोग तब करें जब उपयोगकर्ता नया खाता सेट करना, खाते का विवरण देखना, या कुंजियाँ प्रबंधित करना चाहता हो।
token
convex-dev
Convex पर विनिमेय टोकन बनाएँ और प्रबंधित करें। इसका उपयोग तब करें जब उपयोगकर्ता नया टोकन बनाना, टोकन शेष जाँचना या टोकन आपूर्ति प्रबंधित करना चाहता है।
build-convex
convex-dev
कॉन्वेक्स प्रोजेक्ट को स्रोत से बनाएं। जब कोई योगदानकर्ता कॉन्वेक्स को संकलित, परीक्षण या पैकेज करना चाहे तो उपयोग करें।
convex-db
convex-dev
Convex DB का उपयोग करें — एक lattice-आधारित SQL डेटाबेस। उपयोग तब करें जब उपयोगकर्ताओं को क्वेरी लिखने, JDBC या PostgreSQL क्लाइंट के माध्यम से कनेक्ट करने, टेबल बनाने, डेटा इन्सर्ट/क्वेरी करने में सहायता कर रहे हों,…
convex-lisp
convex-dev
Convex Lisp भाषा संदर्भ — CVM प्रथाएँ, लाइब्रेरी कोड कॉल करना, एक्टर परिभाषाएँ, जूस और त्रुटि कोड। CVM स्रोत लिखने या डीबग करने के समय उपयोग करें…
deploy
convex-dev
कॉन्वेक्स नेटवर्क पर एक एक्टर (स्मार्ट कॉन्ट्रैक्ट) तैनात करें। उपयोग तब करें जब उपयोगकर्ता निर्यातित फ़ंक्शन के साथ एक नया ऑन-चेन एक्टर बनाना चाहता है।
ecosystem
convex-dev
Convex पारिस्थितिकी तंत्र में अभिविन्यास — कौन सी चीज़ किस रिपॉज़िटरी में है, स्पेक्स और दस्तावेज़ कहाँ हैं, और कौन से क्लाइंट लाइब्रेरी मौजूद हैं। जब आपको संदर्भ की आवश्यकता हो तो उपयोग करें…