@signumjs/core
Version:
Principal package with functions and models for building Signum Network applications.
14 lines • 541 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.getAttachmentVersion = getAttachmentVersion;
/**
* Gets the attachment version
* @param transaction The transaction to be checked
* @param versionIdentifier The versionIdentifier string, i.e. MultiOutCreation
* @return 0 if not existent, or version number
*
*/
function getAttachmentVersion(transaction, versionIdentifier) {
return transaction?.attachment?.[`version.${versionIdentifier}`] ?? 0;
}
//# sourceMappingURL=getAttachmentVersion.js.map