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 to perform various account-related operations. Specifically, for the Account resource and the Get Asset Balance operation, it retrieves the balance of a specific asset held by a given DCC address.

Common scenarios where this node is beneficial include:

  • Monitoring the balance of a particular token or asset in a user's wallet.
  • Integrating blockchain asset balances into workflows for financial reporting or automated trading.
  • Verifying asset holdings before executing further transactions or smart contract interactions.

Practical example:

  • A user wants to check how many units of a specific token they hold on the DecentralChain network. By providing their address and the asset ID, this node fetches the current balance of that asset.

Properties

Name Meaning
Base URL The base URL of the DecentralChain node API to use if no credential is supplied. Defaults to https://nodes.decentralchain.io. This is the endpoint where API requests are sent.

Note: For the Get Asset Balance operation, additional parameters used internally but not listed here include:

  • address (the DCC address to query)
  • assetId (the identifier of the asset/token whose balance is requested)

These are required inputs for the operation but were not provided in the input properties JSON.

Output

The output JSON contains the response from the DecentralChain API endpoint /assets/balance/{address}/{assetId}. It typically includes fields such as:

  • balance: The amount of the specified asset held by the address, usually represented in the smallest units.
  • Other metadata related to the asset balance may also be included depending on the API response.

Example output structure (simplified):

{
  "balance": 123456789,
  "assetId": "some-asset-id",
  "address": "DCC-address"
}

No binary data output is produced by this operation.

Dependencies

  • Requires access to a DecentralChain node API endpoint, either via a supplied credential or the default base URL.
  • Uses HTTP GET requests to the DecentralChain REST API.
  • No special environment variables are needed beyond standard n8n HTTP request capabilities.

Troubleshooting

  • Common issues:

    • Incorrect or missing address or assetId parameters will cause the API call to fail or return empty results.
    • Network connectivity problems or incorrect Base URL configuration can lead to request failures.
    • If the node cannot reach the DecentralChain node API, it will throw an error.
  • Error messages:

    • HTTP errors such as 404 or 400 indicate invalid addresses or asset IDs.
    • Timeout or connection errors suggest network or endpoint misconfiguration.
  • Resolution tips:

    • Verify the correctness of the DCC address and asset ID.
    • Ensure the Base URL points to a valid and accessible DecentralChain node.
    • Check internet connectivity and firewall settings.

Links and References


This summary focuses exclusively on the Account resource and Get Asset Balance operation as requested.

Discussion