-
Notifications
You must be signed in to change notification settings - Fork 983
REF: bump bitcoinjs to v7 #7806
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
Conversation
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
limpbrains
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome stuff!
eab57d3 to
ab9ec96
Compare
limpbrains
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don’t see any issues. My only concern is that if we store a bigint in the Wallet state and then try to Json.serialize it, the operation could crash, so we need to be careful with this.
|
If you have any requests to get into v7 before we release the final v7.0.0 version let me know. Once this PR is ready to merge I think I'll go through the bitcoinjs ecosystem and push releases of all these major version bumps. Then we can bump this to 7.0.0 and merge. |
|
@junderw the only inconvenience was that of course we would need to test the actual app builds with v7 thoroughly |
| const origclone = unfinalized.clone; | ||
| unfinalized.clone = () => { | ||
| const newPsbt = origclone.apply(unfinalized); | ||
| const original = newPsbt.txOutputs; | ||
|
|
||
| Object.defineProperty(newPsbt, 'txOutputs', { | ||
| get() { | ||
| return original.map(o => ({ | ||
| ...o, | ||
| script: Buffer.from(uint8ArrayToHex(o.script), 'hex'), | ||
| })); | ||
| }, | ||
| }); | ||
|
|
||
| return newPsbt; | ||
| }; | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@junderw fyi thats the only ugly hack i had to do in order to make it work with v7 (patting myself on the back for having pretty good test coverage)
|
✅ Build 7.1.9 (1747232192) has been uploaded to TestFlight and will be available for testing soon. |
| const xOnlyPubkey = keyPair.publicKey.subarray(1, 33); | ||
| address = bitcoin.payments.p2tr({ | ||
| pubkey: Buffer.from(xOnlyPubkey), | ||
| pubkey: xOnlyPubkey, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice
|
@junderw im seriously intending to merge this and yolo bitcoinjs v7 into production. can i get your blessing please? |
|
✅ Build 7.1.9 (1747476185) has been uploaded to TestFlight and will be available for testing soon. |
helping @junderw test the RC for bitcoinjs v7.
surprisingly, all tests passed, including e2e.
v7 moved from buffers to uint8arrays , which is a major change for all consumers.
this is also our first step towards migrating away from buffers.