UNPKG

@ledgerhq/live-common

Version:
30 lines 715 B
import invariant from "invariant"; const options = [ { name: "fee", type: String, desc: "how much fee", }, { name: "tag", type: Number, desc: "ripple tag", }, ]; function inferTransactions(transactions, opts, { inferAmount, }) { return transactions.flatMap(({ transaction, account }) => { invariant(transaction.family === "xrp", "XRP family"); return { ...transaction, fees: inferAmount(account, opts.fee || "0.001xrp"), tag: opts.tag, }; }); } export default function makeCliTools() { return { options, inferTransactions, }; } //# sourceMappingURL=cli.js.map