Skip to content

Commit

Permalink
Split library into different files to simplify maintenance
Browse files Browse the repository at this point in the history
  • Loading branch information
paulmillr committed Mar 24, 2024
1 parent e7c5cf9 commit 84353bc
Show file tree
Hide file tree
Showing 10 changed files with 3,148 additions and 3,069 deletions.
3,067 changes: 0 additions & 3,067 deletions index.ts

This file was deleted.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@
},
"scripts": {
"build": "tsc && tsc -p tsconfig.esm.json",
"lint": "prettier --check index.ts",
"format": "prettier --write index.ts",
"lint": "prettier --check src",
"format": "prettier --write src",
"test": "node test/index.test.js && node test/psbt-test/bip174-psbt-extended.test.js",
"test:extended": "node --experimental-loader ./test/bitcoinjs-test/esm-loader.js ./test/bitcoinjs-test/index.test.js",
"test:slow": "node test/index.test.js && node test/slow.test.js"
Expand Down
File renamed without changes.
21 changes: 21 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
/*! scure-btc-signer - MIT License (c) 2022 Paul Miller (paulmillr.com) */

// prettier-ignore
export {
p2pk, p2pkh, p2sh, p2ms, p2wsh, p2wpkh, p2tr, p2tr_ns, p2tr_ms, p2tr_pk,
multisig // => classicMultisig?
} from './payment.js';
export { OP, RawTx, CompactSize, Script, ScriptNum } from './script.js';
export { Transaction } from './transaction.js';
export { selectUTXO } from './utxo.js';
export { NETWORK, compareBytes as _cmpBytes, TAPROOT_UNSPENDABLE_KEY } from './utils.js';

// Utils
// prettier-ignore
export {
Address, getAddress, WIF,
taprootListToTree, OutScript, _sortPubkeys, sortedMultisig, combinations
} from './payment.js'; // remove
export { _DebugPSBT, TaprootControlBlock } from './psbt.js'; // remove
export { Decimal, bip32Path, SigHash, PSBTCombine, DEFAULT_SEQUENCE } from './transaction.js'; // remove
export { _cmpBig, _Estimator } from './utxo.js';

0 comments on commit 84353bc

Please sign in to comment.