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);

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)

6.3 Reverse Resolve Address

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

Function Name

lookup_address
  • Arguments

    address (str): The blockchain address to lookup
  • Example Code

    from crypto_com_developer_platform_client import CronosId
    
    cronosId = CronosId.lookup_address('example-address')
    print(cronosId)

Last updated

Was this helpful?