DecentralChain (DCC) icon

DecentralChain (DCC)

Create, sign and broadcast DecentralChain transactions, plus query blockchain data

Overview

This node interacts with the DecentralChain (DCC) blockchain network, providing various utilities including querying aliases associated with a blockchain address. Specifically, the Utility - Get Aliases operation fetches all aliases registered for a given DCC address.

This node is useful in scenarios where you need to resolve or list human-readable aliases linked to blockchain addresses, which can simplify identification and referencing of accounts on the DCC network. For example, a user might want to display all known aliases for an address in a wallet application or verify alias ownership before performing transactions.

Properties

Name Meaning
Base URL The base URL of the DCC node API to use if no credential is supplied. Defaults to https://nodes.decentralchain.io.

Output

The output JSON contains the response from the DCC node API endpoint /alias/by-address/{address}, which returns the list of aliases associated with the specified address.

Typical structure includes:

  • An array of alias objects, each containing details such as:
    • alias (string): The alias name.
    • address (string): The blockchain address the alias belongs to.
    • Other metadata fields as provided by the DCC API.

Additionally, the output includes a debug object with metadata about the operation, such as:

  • operation: The performed operation (getAliases).
  • endpoint: The API endpoint called.
  • baseUrl: The base URL used.
  • parameters: Input parameters like the address.
  • timestamp: When the request was made.

Example output snippet (simplified):

{
  "aliases": [
    {
      "alias": "myalias",
      "address": "DCC3...xyz"
    },
    {
      "alias": "anotheralias",
      "address": "DCC3...xyz"
    }
  ],
  "debug": {
    "operation": "getAliases",
    "endpoint": "/alias/by-address/{address}",
    "baseUrl": "https://nodes.decentralchain.io",
    "parameters": {
      "address": "DCC3...xyz"
    },
    "timestamp": "2024-06-01T12:00:00Z"
  }
}

No binary data output is produced by this operation.

Dependencies

  • Requires access to a DecentralChain node API endpoint, either via:

    • A configured API key credential (optional).
    • Or the Base URL property specifying the node URL.
  • The node uses HTTP requests to communicate with the DCC REST API.

  • No additional external services or environment variables are required specifically for this operation.

Troubleshooting

  • Common issues:

    • Invalid or unreachable Base URL: Ensure the Base URL is correct and the node is accessible.
    • Address parameter missing or invalid: The address must be a valid DCC blockchain address.
    • Network connectivity problems may cause request failures.
  • Error messages:

    • If the address is invalid or not found, the API may return an error or empty result.
    • HTTP errors (e.g., 404, 500) indicate issues with the node endpoint or request.
    • JSON parsing errors could occur if the API response is malformed.
  • Resolution tips:

    • Verify the address format before running the node.
    • Check network connectivity and API availability.
    • Use the debug information in the output to trace request details.
    • If using credentials, ensure they are correctly configured and have necessary permissions.

Links and References


This summary covers the static analysis of the execute() method for the Utility resource's Get Aliases operation, focusing on its input, processing, and output behavior.

Discussion