DecentralChain (DCC) icon

DecentralChain (DCC)

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

Overview

This node interacts with the DecentralChain (DCC) blockchain to list transactions associated with a specific address. It queries the blockchain node's REST API to retrieve a paginated list of transactions for a given owner address.

Common scenarios where this node is beneficial include:

  • Monitoring all transactions related to a particular wallet or account.
  • Auditing transaction history for compliance or record-keeping.
  • Building dashboards or reports that display recent blockchain activity for an address.

For example, you can use this node to fetch the last 50 transactions sent or received by a wallet address on the DecentralChain network, optionally paginating through older transactions using the offset parameter.

Properties

Name Meaning
Base URL The base URL of the DecentralChain node API to query. Used if no credential base URL is set. Default: https://nodes.decentralchain.io
Owner Address The blockchain address whose transactions you want to list.
Limit Maximum number of transactions to return in one request. Minimum value is 1. Default: 50
Offset Pagination offset to skip a number of transactions before starting to return results. Minimum value is 0. Default: 0

Output

The output JSON contains the response from the DecentralChain node API endpoint /transactions/address/{ownerAddress}/limit/{limit}?after={offset}. This typically includes:

  • An array or object listing transactions related to the specified owner address.
  • Each transaction entry will contain details such as transaction ID, type, timestamp, sender, recipient, amount, asset involved, and other blockchain-specific metadata.
  • A debug field is included with metadata about the operation, including the API endpoint used, parameters, base URL, and timestamp for traceability.

No binary data is output by this operation.

Example output structure (simplified):

{
  "transactions": [
    {
      "id": "transactionId1",
      "type": 4,
      "sender": "address1",
      "recipient": "address2",
      "amount": 100000000,
      "timestamp": 1680000000000,
      ...
    },
    ...
  ],
  "debug": {
    "operation": "listTransactions",
    "endpoint": "/transactions/address/{ownerAddress}/limit/{limit}?after={offset}",
    "baseUrl": "https://nodes.decentralchain.io",
    "parameters": {
      "ownerAddress": "...",
      "limit": 50,
      "offset": 0
    },
    "timestamp": "2024-06-xxTxx:xx:xx.xxxZ"
  }
}

Dependencies

  • Requires access to a DecentralChain node API endpoint. This can be configured via credentials or by specifying the Base URL property.
  • No external libraries are strictly required for this operation since it uses standard HTTP requests.
  • The node supports optional credentials for API authentication but can work with public nodes without credentials.

Troubleshooting

  • Library Loading Failure: The node attempts to load a blockchain transaction library at runtime. If this fails, it falls back to mock functions. This does not affect the "List Transactions" operation since it uses direct HTTP requests, but other operations may fail.
  • HTTP Request Errors: Common errors include network connectivity issues, incorrect Base URL, or invalid owner address format. Ensure the Base URL points to a valid DecentralChain node and the owner address is correctly formatted.
  • Empty Results: If no transactions are returned, verify that the owner address has activity on the blockchain and that the limit/offset parameters are correct.
  • Pagination Issues: Using an offset larger than the total number of transactions will result in empty responses. Adjust offset accordingly.

Links and References

Discussion