UNPKG

@mutants/cardano-tx-builder

Version:

A package that provides utility functions to build and destructure a cardano transaction

14 lines (13 loc) 362 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.sortInputs = void 0; const sortInputs = (inputs) => [...inputs].sort((a, b) => { if (a.txHash > b.txHash) { return 1; } else if (b.txHash > a.txHash) { return -1; } return a.txIndex > b.txIndex ? 1 : -1; }); exports.sortInputs = sortInputs;