UNPKG

postchain-client

Version:

Client library for accessing a Postchain node through REST.

16 lines 600 B
import { GetTransactionRidException } from "../blockchainClient/errors"; import { getDigestToSignFromRawGtxBody } 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 function calculateTransactionRid(transaction, merkleHashVersion) { try { return getDigestToSignFromRawGtxBody(transaction, merkleHashVersion); } catch (error) { throw new GetTransactionRidException(error); } } //# sourceMappingURL=calculateTransactionRid.js.map