UNPKG

@ledgerhq/coin-canton

Version:
30 lines 720 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 === "canton", "Canton family"); return { ...transaction, fee: inferAmount(account, opts.fee || "0.001brp"), tag: opts.tag, }; }); } export default function makeCliTools() { return { options, inferTransactions, }; } //# sourceMappingURL=cli.js.map