Skip to content

Commit aca9766

Browse files
authored
Merge pull request bitcoinjs#1425 from lukechilds/psbt
[WIP] Add PSBT support
2 parents 19a126c + 6e447b1 commit aca9766

19 files changed

+4441
-0
lines changed

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,14 @@ The below examples are implemented as integration tests, they should be very eas
8585
Otherwise, pull requests are appreciated.
8686
Some examples interact (via HTTPS) with a 3rd Party Blockchain Provider (3PBP).
8787

88+
### Warning: Currently the tests use TransactionBuilder, which will be removed in the future (v6.x.x or higher)
89+
We will move towards replacing all instances of TransactionBuilder in the tests with the new Psbt.
90+
91+
Currently we have a few examples on how to use the newer Psbt class at the following link:
92+
- [Psbt examples](https://github.com/bitcoinjs/bitcoinjs-lib/blob/master/test/integration/transactions-psbt.js)
93+
94+
The rest of the examples are below (using TransactionBuilder for Transaction creation)
95+
8896
- [Generate a random address](https://github.com/bitcoinjs/bitcoinjs-lib/blob/master/test/integration/addresses.js)
8997
- [Import an address via WIF](https://github.com/bitcoinjs/bitcoinjs-lib/blob/master/test/integration/addresses.js)
9098
- [Generate a 2-of-3 P2SH multisig address](https://github.com/bitcoinjs/bitcoinjs-lib/blob/master/test/integration/addresses.js)

package-lock.json

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@
4747
"dependencies": {
4848
"@types/node": "10.12.18",
4949
"bech32": "^1.1.2",
50+
"bip174": "^1.0.0",
5051
"bip32": "^2.0.3",
5152
"bip66": "^1.1.0",
5253
"bitcoin-ops": "^1.4.0",

src/index.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ const script = require('./script');
1616
exports.script = script;
1717
var block_1 = require('./block');
1818
exports.Block = block_1.Block;
19+
var psbt_1 = require('./psbt');
20+
exports.Psbt = psbt_1.Psbt;
1921
var script_1 = require('./script');
2022
exports.opcodes = script_1.OPS;
2123
var transaction_1 = require('./transaction');

0 commit comments

Comments
 (0)