UNPKG

postchain-client

Version:

Client library for accessing a Postchain node through REST.

16 lines 545 B
import { GetTransactionRidException } from "../blockchainClient/errors"; import * as gtxTool from "../gtx/gtx"; /** * Calculates and returns the transaction RID, i.e., the merkle root hash of the transaction. * @param transaction The transaction in format of RawGtxBody * */ export const calculateTransactionRid = (transaction) => { try { return gtxTool.getDigestToSignFromRawGtxBody(transaction); } catch (e) { throw new GetTransactionRidException(e); } }; //# sourceMappingURL=calculateTransactionRid.js.map