@vbyte/btc-dev 1.0.12 → 1.0.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lib/tx/create.d.ts +6 -6
- package/dist/lib/tx/create.js +2 -2
- package/dist/main.cjs +2 -2
- package/dist/main.cjs.map +1 -1
- package/dist/module.mjs +2 -2
- package/dist/module.mjs.map +1 -1
- package/dist/package.json +1 -1
- package/dist/script.js +1 -1
- package/dist/script.js.map +1 -1
- package/dist/types/txdata.d.ts +5 -12
- package/package.json +1 -1
- package/src/lib/tx/create.ts +8 -8
- package/src/types/txdata.ts +5 -13
package/dist/module.mjs
CHANGED
|
@@ -13717,9 +13717,9 @@ function create_tx_output(config) {
|
|
|
13717
13717
|
const value = normalize_value(config.value);
|
|
13718
13718
|
return { script_pk, value };
|
|
13719
13719
|
}
|
|
13720
|
-
function create_tx(config
|
|
13720
|
+
function create_tx(config) {
|
|
13721
13721
|
assert_tx_template(config);
|
|
13722
|
-
const { vin = [], vout = [] } = config;
|
|
13722
|
+
const { vin = [], vout = [] } = config ?? { vin: [], vout: [] };
|
|
13723
13723
|
const locktime = config.locktime ?? DEFAULT.LOCKTIME;
|
|
13724
13724
|
const version = config.version ?? DEFAULT.VERSION;
|
|
13725
13725
|
const inputs = vin.map(txin => create_tx_input(txin));
|