CronosID Module
6.1 Is CronosId
isCronosId{string} name: The string to check for CronosId validity.import { CronosId } from '@crypto.com/developer-platform-client'; const result = CronosId.isCronosId('example-cronos-id'); console.log(result);
{boolean}: True if the string is a valid CronosId, false otherwise.example-boolean
6.2 Resolve CronosId
resolve_namename (str): The CronosId name to resolve (CronosIds with the `.cro` suffix are supported, e.g. `xyz.cro`)from crypto_com_developer_platform_client import CronosId address = CronosId.resolve_name('example-cronos-id') print(address)
Response containing the resolved blockchain address.ValueError: If the CronosId class is not initialized with a Client instance.{'status': 'Success', 'data': 'example-address'}
forwardResolve{string} cronosId: The CronosId to resolve.import { CronosId } from '@crypto.com/developer-platform-client'; try { const address = wait CronosId.forwardResolve('alice.cro'); console.log(address); } catch(err) { console.log(err); }
{Promise<string>}: A promise that resolves to the resolved address.{Error}: Throws an error if the CronosId is not valid or if the resolution fails.{ status: 'Success', data: 'example-address' }
6.3 Reverse Resolve Address
Last updated
Was this helpful?