Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: implement bip174 Partially Signed Bitcoin Transaction #607

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

joemphilips
Copy link

@joemphilips joemphilips commented Sep 12, 2018

I've been trying to implement rpc methods which imitates the new bitcoin core feature "PSBT".
Not complete yet, but like to have a general feedback for my approach.

TODO:

  • implement methods for (de)serialization.
  • implement methods to update and sign.
  • Implement methods to deal with PSBT on Wallet and TXDB
  • implement methods for combining and finalizing psbt.
  • implement rpc interface.
  • write tests.

@martindale
Copy link

Most excellent! Looking forward to seeing this merged. 🚀

@codecov-io
Copy link

codecov-io commented Sep 26, 2018

Codecov Report

Merging #607 into master will increase coverage by 1.17%.
The diff coverage is 61.62%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #607      +/-   ##
==========================================
+ Coverage    53.2%   54.37%   +1.17%     
==========================================
  Files         104      106       +2     
  Lines       27724    29042    +1318     
  Branches     4752     4970     +218     
==========================================
+ Hits        14751    15793    +1042     
- Misses      12973    13249     +276
Impacted Files Coverage Δ
lib/wallet/path.js 70.28% <0%> (-1.04%) ⬇️
lib/hd/hd.js 57.62% <100%> (-0.27%) ⬇️
lib/primitives/tx.js 82.5% <100%> (+0.89%) ⬆️
lib/node/rpc.js 21.34% <3.48%> (-2.29%) ⬇️
lib/wallet/rpc.js 8.88% <4%> (-0.37%) ⬇️
lib/hd/keyorigin.js 68.42% <68.42%> (ø)
lib/primitives/psbt.js 74.53% <74.53%> (ø)
lib/wallet/wallet.js 66.66% <86.48%> (+0.37%) ⬆️
lib/script/script.js 78.68% <91.66%> (+1.74%) ⬆️
... and 25 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 375965c...20c42d2. Read the comment docs.

constructor(options) {
this.fingerPrint = -1;
this.path = [];
this.hardened = [];

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like this member is unused and we rely on the path uint32 values to contain the hardened status internally.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for review. Now fixed.
I'd better test against actual HW Wallets. But so far coldcard wallet is the only one supports PSBT as I know.
I'm now waiting for it to arrive. :(

lib/hd/keyorigin.js Outdated Show resolved Hide resolved
lib/hd/keyorigin.js Outdated Show resolved Hide resolved
@pinheadmz pinheadmz added enhancement Improving a current feature tests Has tests for code change is just an addtional test labels Jan 23, 2019
@braydonf braydonf added the wallet Wallet related label Feb 6, 2019
lib/node/rpc.js Outdated
}

async createPSBT(args, help) {
if (help || args.length < 2 || 4 < args.length)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks like this should be ...|| 3 < args.length

    * write tests.
    * implement methods for (de)serialization.
    * implement methods for update and sign.
    * implement methods for psbt finalization.
    * implement rpc interface.
@0xbrito
Copy link

0xbrito commented Oct 31, 2022

still not merged?

@pinheadmz
Copy link
Member

still not merged?

Correct. Wanna help?

@andriibezkorovainyi
Copy link

@pinheadmz psbt's still unavailable in bcoin?

@pinheadmz
Copy link
Member

@pinheadmz psbt's still unavailable in bcoin?

Yep. this is the unmerged PR right here -- wanna help take it over or review?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Improving a current feature tests Has tests for code change is just an addtional test wallet Wallet related
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants