feat(connect): support ordinals purpose for P2TR addresses#30
Open
marcopeereboom wants to merge 1 commit into
Open
feat(connect): support ordinals purpose for P2TR addresses#30marcopeereboom wants to merge 1 commit into
marcopeereboom wants to merge 1 commit into
Conversation
This was referenced Apr 22, 2026
Contributor
Author
|
FWIW, I tested all of this code using metamask flask and I was able to send and move ordinals. |
Remove the payment-only guard from the satsConnect connect handler. When purposes includes ordinals, return P2TR address type and AddressPurpose.Ordinals. Payment-only requests continue to return P2WPKH with no behavioral change for existing callers.
f88a8e9 to
2de2004
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Explanation
bitcoin:connectwithpurposes: ['ordinals']currently throws"Only payment addresses are supported." The satsConnect connect handler
explicitly rejects any purpose other than
payment, and#standardAccountToSatsAccounthardcodesAddressType.p2wpkh.This PR removes the payment-only guard and passes
purposesthrough to#standardAccountToSatsAccount. When ordinals is requested, it returnsAddressType.p2trandAddressPurpose.Ordinals. Payment-only requestscontinue to return P2WPKH — no behavioral change for existing callers.
The v4
request('getAddresses', ...)path also passes purposes throughso ordinals works via both the wallet standard and satsConnect v4 APIs.
README updated with ordinals connect examples for both APIs.
Requires the companion snap PR to serve P2TR accounts from the keyring.
References
Checklist