DecentralChain (DCC) icon

DecentralChain (DCC)

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

Overview

The node interacts with the DecentralChain (DCC) blockchain network to perform various transaction-related operations. Specifically, for the Transaction resource and the Get Transaction operation, it retrieves detailed information about a specific blockchain transaction by its ID.

This node is beneficial in scenarios where users need to query the blockchain for transaction details such as status, sender, recipient, amount, and other metadata. For example, it can be used to verify if a payment has been completed, audit transactions, or fetch transaction history details programmatically within an automation workflow.

Practical example:

  • After initiating a token transfer, use this node to fetch the transaction details by providing the transaction ID to confirm successful processing on the blockchain.

Properties

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

Output

The output JSON contains the full transaction details as returned by the DecentralChain node API for the specified transaction ID. This includes fields such as transaction type, id, sender, recipient, amount, timestamp, proofs, and any other blockchain-specific metadata related to that transaction.

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

  • Operation name (getTransaction)
  • API endpoint called
  • Base URL used
  • Parameters passed (transaction ID)
  • Timestamp of the request

No binary data is output for this operation.

Example output structure (simplified):

{
  "id": "transactionId123",
  "type": 4,
  "sender": "address1...",
  "recipient": "address2...",
  "amount": 100000000,
  "timestamp": 1680000000000,
  "proofs": ["..."],
  "debug": {
    "operation": "getTransaction",
    "endpoint": "/transactions/info/transactionId123",
    "baseUrl": "https://nodes.decentralchain.io",
    "parameters": {
      "transactionId": "transactionId123"
    },
    "timestamp": "2024-06-01T12:00:00.000Z"
  }
}

Dependencies

  • Requires access to a DecentralChain node API endpoint, either via credentials or by specifying the Base URL.
  • Uses HTTP requests to query the blockchain node.
  • Optionally depends on an API key credential for authentication if configured, otherwise uses the provided Base URL without authentication.
  • No additional external services are required for this operation.

Troubleshooting

  • Common issues:

    • Invalid or missing transaction ID parameter will cause the API call to fail.
    • Network connectivity issues to the specified Base URL will prevent fetching transaction data.
    • If the node API endpoint requires authentication and no valid credentials or API keys are provided, the request may be rejected.
  • Error messages:

    • "Library loading failed": Indicates internal library dependencies failed to load; the node falls back to mock functions but real blockchain interaction won't work.
    • "Attachment is not valid base58": Not relevant for Get Transaction but may appear in other operations involving attachments.
    • "Invalid JSON in Order JSON": Not relevant here but indicates malformed JSON input in other operations.
    • HTTP errors from the blockchain node API (e.g., 404 if transaction not found) will be surfaced as node errors.
  • Resolutions:

    • Ensure the transaction ID is correct and exists on the blockchain.
    • Verify network access to the Base URL.
    • Provide valid credentials or API keys if required by the node API.
    • Check for typos or formatting errors in parameters.

Links and References


This summary focuses exclusively on the Transaction > Get Transaction operation as requested.

Discussion