e2e: Add test for testing different address types#470
e2e: Add test for testing different address types#470Abhay349 wants to merge 1 commit intocaravan-bitcoin:mainfrom
Conversation
|
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Legend101Zz
left a comment
There was a problem hiding this comment.
just a minor comment , and rest it looks really good to me , can you please also attach a screenshot of the working e2e test ? Thanks
| { | ||
| type: "P2SH-P2WSH", | ||
| label: "Nested SegWit (P2SH-P2WSH)", | ||
| regex: /^2[MN][a-zA-Z0-9]{33}$/ |
There was a problem hiding this comment.
question here , Base58 addresses (like P2SH) are not fixed length. While they are usually 35 characters, they can technically be 33 or 34 characters depending on the number of leading zeros in the hash. maybe Loosen the length requirement and refine the allowed characters ?
There was a problem hiding this comment.
I agree and that makes sense, I will loosen regex to avoid enforcing a strict length.
I’m planning to change it to something like:
/^2[1-9A-HJ-NP-Za-km-z]{30,40}$/so that we can validate structure without assuming an exact length, let me know if it looks good.
Thanks for guidance :)
Signed-off-by: Abhay349 <pandeyabhay967@gmail.com>
|
Hi @Legend101Zz I have attached screenshots of working e2e tests and also updated the regex for P2SH-P2WSH. |



What kind of change does this PR introduce?
Issue Number:
Fixes subtask of #442
If relevant, did you update the documentation?
Summary
This PR adds, parameterized end-to-end tests to validate different wallet address types in the Caravan coordinator.
Previously, E2E tests mainly covered the default address behavior. This change ensures comprehensive coverage for:
P2WSH (Native SegWit): Verifies correct address generation (bcrt1q...) and fund reception.
P2SH-P2WSH (Nested SegWit): Verifies correct address generation (2...) and fund reception.
P2TR (Taproot): Test scaffold included but currently skipped.
For each active type, the test validates:
Does this PR introduce a breaking change?
-No
Checklist
npm run changeset)Other information
P2TR (Taproot) skipped: The P2TR test case is explicitly marked as
skip: true. Investigation intocaravan-bitcoin/src/types/addresses.tsrevealed that while P2TR is defined as a validMultisigAddressType, it is currently commented as "not able to be used anywhere yet". The test is preserved to enable immediate verification once support is fully implemented in the underlying package.
All coordinator E2E tests (P2WSH and P2SH-P2WSH) pass locally using the Docker-based setup.
Have you read the contributing guide?
Yes