Network Module
Network module handles blockchain network metadata accessing.
10.1 Info
Get general network info.
Function Name
infoExample Code
from crypto_com_developer_platform_client import Network data = Network.info() print(data)
Returns
Network metadata.Errors
ValueError: If the Network class is not initialized with a Client instance.Example Return
{'status': 'Success', 'data': {'name': 'example-name', 'chainId': 'example-chain-id'}}
10.2 Chain ID
Get the current chain ID.
Function Name
chain_idExample Code
from crypto_com_developer_platform_client import Network chainId = Network.chain_id() print(chainId)
Returns
Chain ID value.Errors
ValueError: If the Network class is not initialized with a Client instance.Example Return
{'status': 'Success', 'data': {'chainId': 'example-chain-id'}}
10.3 Client Version
Get the connected node's client version.
Function Name
client_versionExample Code
from crypto_com_developer_platform_client import Network version = Network.client_version() print(version)
Returns
Client version string.Errors
ValueError: If the Network class is not initialized with a Client instance.Example Return
{'status': 'Success', 'data': {'version': 'example-version'}}
Last updated
Was this helpful?