For the complete documentation index, see llms.txt. This page is also available as Markdown.

CronosID Module

CronosID module manages the conversion between CronosIDs and standard addresses.

Note: CronosId is not supported on Cronos ZK EVM Mainnet.

To learn more about how to use the AI Agent SDK to interact with the wallet module, please visit AI Agent SDK CronosId Operations.

6.1 Is CronosId

Checks if a given string is a valid CronosId, which is a string ending with '.cro' and not empty. Example: 'alice.cro' is a valid CronosId, but 'alice' is not.

Function Name

isCronosId
  • Arguments

    {string} name: The string to check for CronosId validity.
  • Example Code

    import { CronosId } from '@crypto.com/developer-platform-client';
    
    const result = CronosId.isCronosId('example-cronos-id');
    console.log(result);
  • Returns

    {boolean}: True if the string is a valid CronosId, false otherwise.
  • Example Return

    example-boolean

6.2 Resolve CronosId

Resolves a CronosId to a wallet address.

Function Name

resolve_name
  • Arguments

    name (str): The CronosId name to resolve (CronosIds with the `.cro` suffix are supported, e.g. `xyz.cro`)
  • Example Code

    from crypto_com_developer_platform_client import CronosId
    
    address = CronosId.resolve_name('example-cronos-id')
    print(address)
  • Returns

    Response containing the resolved blockchain address.
  • Errors

    ValueError: If the CronosId class is not initialized with a Client instance.
  • Example Return

    {'status': 'Success', 'data': 'example-address'}

Function Name

forwardResolve
  • Arguments

    {string} cronosId: The CronosId to resolve.
  • Example Code

    import { CronosId } from '@crypto.com/developer-platform-client';
    
    try {
      const address = wait CronosId.forwardResolve('alice.cro');
      console.log(address);
    }
      catch(err) {
      console.log(err);
    }
  • Returns

    {Promise<string>}: A promise that resolves to the resolved address.
  • Errors

    {Error}: Throws an error if the CronosId is not valid or if the resolution fails.
  • Example Return

    {
      status: 'Success',
      data: 'example-address'
    }

6.3 Reverse Resolve Address

Resolves a wallet address to a CronosId if it has one.

Function Name

  • Arguments

  • Example Code

  • Returns

  • Errors

  • Example Return

Function Name

  • Arguments

  • Example Code

  • Returns

  • Errors

  • Example Return

Last updated

Was this helpful?