Crypto.com AI Agent SDK
  • Getting Started
    • Introduction
    • Quick Start Guide: Simulation Entry Point
  • Core Concepts Overview
    • Plugins
    • Tools
    • Blockchain Functions
      • Wallet Management
      • Token Interaction
      • Transaction Queries
      • Block Information
      • Contract Operations
      • CronosID Operations
      • Defi Operations
      • Crypto.com Exchange
    • Built-in Telegram Feature
    • Advanced Usage: Custom Instructions
    • Dynamic AI Model Manager
  • Crypto.com On-Chain Developer Platform
    • Developer Platform API Methods
  • On-Chain Functions and Examples
    • AI Agent Chatbot
    • "Magic Link" Signer
  • Resources for Developers
Powered by GitBook
On this page

Was this helpful?

  1. Core Concepts Overview
  2. Blockchain Functions

CronosID Operations

The AI Agent SDK offers powerful CronosID-related features, allowing developers to map CronosIDs and associated blockchain addresses.

These features enhance user-friendliness and accessibility by enabling seamless name-to-address and address-to-name resolutions on Cronos Chains.

6.1 Resolve CronosId name

Resolve a given CronosId name to its associated blockchain address using the Crypto.com developer platform.

  • Arguments

    name (str): The CronosId name to resolve (e.g., "xyz.cro").
  • Example Query

    "Resolve CronosId name <example-cronos-id>"
  • Returns

    str: A formatted string containing the resolved blockchain address.
  • Example Response

    The CronosId name <example-cronos-id> has been successfully resolved to the blockchain address: <example-address>.

Example Code

from crypto_com_agent_client import Agent

agent = Agent.init(
    llm_config={
        "provider": "OpenAI",
        "model": "gpt-4",
        "provider-api-key": "sk-proj-example-key",
        "temperature": "float-controlling-output-randomness",
    },
    blockchain_config={
         "chainId": "chain-id",
         "explorer-api-key": "your-api-key",
         "private-key": "your-private-key",
         "sso-wallet-url": "your-sso-wallet-url",
    },
)
response = agent.interact("Resolve CronosId name <example-cronos-id>")
print(response)

6.2 Lookup CronosId address

Lookup a given blockchain address to find the associated CronosId name from the Crypto.com developer platform.

  • Arguments

    address (str): The blockchain address to lookup.
  • Example Query

    "Lookup CronosId for <example-address>"
  • Returns

    str: A formatted string containing the CronosId name.
  • Example Response

    The CronosId for the address <example-address> is <example-cronos-id>

Example Code

from crypto_com_agent_client import Agent

agent = Agent.init(
    llm_config={
        "provider": "OpenAI",
        "model": "gpt-4",
        "provider-api-key": "sk-proj-example-key",
        "temperature": "float-controlling-output-randomness",
    },
    blockchain_config={
         "chainId": "chain-id",
         "explorer-api-key": "your-api-key",
         "private-key": "your-private-key",
         "sso-wallet-url": "your-sso-wallet-url",
    },
)
response = agent.interact("Lookup CronosId for <example-address>")
print(response)
PreviousContract OperationsNextDefi Operations

Last updated 1 day ago

Was this helpful?