REF: bump bitcoinjs to v7#7806
Conversation
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
eab57d3 to
ab9ec96
Compare
limpbrains
left a comment
There was a problem hiding this comment.
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.
@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, |
|
@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.