Lines 9-49javascript
9}) : (function(o, m, k, k2) {
10 if (k2 === undefined) k2 = k;
13var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14 Object.defineProperty(o, "default", { enumerable: true, value: v });
18var __importStar = (this && this.__importStar) || function (mod) {
19 if (mod && mod.__esModule) return mod;
21 if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22 __setModuleDefault(result, mod);
25var __importDefault = (this && this.__importDefault) || function (mod) {
26 return (mod && mod.__esModule) ? mod : { "default": mod };
28Object.defineProperty(exports, "__esModule", { value: true });
29exports.Transaction = void 0;
30const types_1 = require("../types");
31const shapes_1 = require("../shapes");
MediumDynamic Require
Package source references dynamic require/import behavior.
dist/transaction/index.jsView on unpkg · L29 32const utils_1 = require("../utils");
33const utils_2 = require("../utils");
34const constants_1 = require("../wallet/constants");
35const utils_3 = require("../utils");
36const secp256k1_1 = __importDefault(require("@bitcoinerlab/secp256k1"));
37const bitcoin = __importStar(require("bitcoinjs-lib"));
38const bitcoin_address_validation_1 = require("bitcoin-address-validation");
39const bip371_1 = require("bitcoinjs-lib/src/psbt/bip371");
40bitcoin.initEccLib(secp256k1_1.default);
42 constructor({ wallet }) {
43 this.getTotalFee = ({ satsPerByte, message = '', transaction = this.data, fundingLightning = false, coinSelectPreference = this._wallet.coinSelectPreference }) => {
44 const baseTransactionSize = constants_1.TRANSACTION_DEFAULTS.recommendedBaseFee;
46 let inputs = transaction.inputs || [];
47 if (coinSelectPreference !== types_1.ECoinSelectPreference.consolidate &&
49 const coinSelectRes = this.autoCoinSelect({