Developers Forum for XinFin XDC Network

jurjees ahamed
jurjees ahamed

Posted on

XDC Transaction Status Checker NPM Package

Hello XDC community,today i am come up with the new npm package to check the status of the xdc transaction with the simple steps.

For Easy Integration checkout below npm package.

https://www.npmjs.com/package/xdc-txn-status-checker

Check out the list of steps to integrate status checker:

npm install xdc-txn-status-checker --save
Enter fullscreen mode Exit fullscreen mode

Code Usage

//For React
import {statusChecker} from 'xdc-txn-status-checker';

//For Nodejs
const {statusChecker} = require('xdc-txn-status-checker');

statusChecker(["0x025f567bbfb962f960a72af418088021f7b8f55b12ba7c3b493188ad4430d267", "0xb511732d5000f5d227994ae69905bca5a833df4a20107b43a7e238dfc75d6f5b"], "apothem")
.then(result=>{
    console.log("output",result)
}).catch(err=>{
    console.log("err",err)
})
Enter fullscreen mode Exit fullscreen mode

Options
Status Checker needs two parameter first one is transaction array and another one is network type both of them are mandatory

Network Type - mainnet,apothem.

Sample Result

[
{
    "txnHash": "0x025f567bbfb962f960a72af418088021f7b8f55b12ba7c3b493188ad4430d267",
    "Status": true
  },
  {
    "txnHash": "0xb511732d5000f5d227994ae69905bca5a833df4a20107b43a7e238dfc75d6f5b",
    "Status": true
  }
]
Enter fullscreen mode Exit fullscreen mode

Discussion (1)

Collapse
rupps_blocksscan profile image
Rupali Mestry

We appreciate your efforts for the above and thanking you for the same.
Surely, it will be very useful to XDC Community.