Crypto-APIs / Crypto_APIs_2.0_SDK_Node.js

Crypto APIs 2.0 Node.js library/SDK
14 stars 11 forks source link

I can't get transaction details for Tron blockchain #5

Open sheremet opened 1 year ago

sheremet commented 1 year ago

I have subscribed to New confirmed coins transactions to tron blockchain and nile network

I have received callback with the next payload:

{
  "apiVersion": "2021-03-20",
  "referenceId": "c83c47b2-18a8-445b-bc85-3d03ef9169c8",
  "idempotencyKey": "f9c6a22bb5d370d32993183d09f21cce10a30271a0909c05e2be2fdbb021d1ea",
  "data": {
    "product": "BLOCKCHAIN_EVENTS",
    "event": "ADDRESS_COINS_TRANSACTION_CONFIRMED_EACH_CONFIRMATION",
    "item": {
      "blockchain": "tron",
      "network": "nile",
      "address": "TDsKxBfezg6apsCumnTspxgVzK3fGKTb3z",
      "minedInBlock": {
        "height": 32434449,
        "hash": "0000000001eee911eee5e646249b33b35942bff7d858380c8ac67d895ac8235b",
        "timestamp": 1671041100
      },
      "transactionId": "19ede425664953aa18d088cda9e0be2f43583959ab9e59594e59b1105a6bb1f0",
      "currentConfirmations": 1,
      "targetConfirmations": 1,
      "amount": "15",
      "unit": "TRX",
      "direction": "incoming"
    }
  }
}

But when I call Get Transaction Details By Transaction ID with tron blockchain and nile network I have received error with:

{
  "apiVersion": "2021-03-20",
  "requestId": "639a108e4af8b630916d2c9d",
  "error": {
    "code": "invalid_data",
    "message": "The data provided seems to be invalid.",
    "details": [
      {
        "attribute": "blockchain",
        "message": "Possible values: bitcoin, bitcoin-cash, litecoin, dogecoin, dash, ethereum, ethereum-classic, binance-smart-chain, zcash"
      },
      {
        "attribute": "network",
        "message": "Possible values: mainnet, testnet, mordor, goerli"
      }
    ]
  }
}

I think this is CryptoApis back-end issue and also spec relative, because subscribing to Callback event is allowed for tron blockchain and nile network, callback return transaction, but get transaction details not possible for this blockchain.

sheremet commented 1 year ago

Talk to Litecoin Support on the Litecointalk live support so that your issue can be looked into.

How Litecoin related to this issue? I need Tron support in CryptoAPIs. I don't need any other additional solutions for getting balances, transactions etc. CryptoAPI developers team will solve this issue soon.