CEP_Account.getTransaction()

With this method you can search a specific transaction by the blockID and the TxID.

Function Signature

async getTransaction(BlockID, TxID)

Parameters

Parameter Name
Datatype

BlockID

String

TxID

String

Example

const Address = 'your-wallet-address';

let account = new CEP_Account();

//...
txBlock = "your_tx_block" //usually you get that from getTransactionOutcome
txID = "your_tx_id" //usually you get that from submitCertificate
console.log("Transaction ID:", txID);
console.log("Transaction Block:", txBlock);

console.log("Searching Transaction");
const getTxResult = await account.getTransaction(txBlock, txID);
console.log("Get Transaction Result :", getTxResult);

if (getTxResult.Result === 200) {
  console.log("Certificate found :", getTxResult);
  
} else {
  console.log("Certificate Not Found :", getTxResult.message);
}
//...

Expected Result

Last updated