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>"
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>"
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)
Last updated
Was this helpful?