Skip to content

Feat/subscription delegation update - #10339

Draft
tuna1207 wants to merge 8 commits into
mainfrom
feat/subscription-delegation-update
Draft

tuna1207 wants to merge 8 commits into
mainfrom
feat/subscription-delegation-update

Conversation

@tuna1207

@tuna1207 tuna1207 commented Sep 22, 2026 •

Copy link
Copy Markdown
Member

Explanation

Adds SubscriptionDelegationService:startSubscriptionWithDelegation, providing a single-approval subscription checkout flow that:

  • Combines Money Account vault permissions with the recurring subscription permission.
  • Creates an immutable, fingerprinted authorization bundle for confirmation.
  • Requests MM Pay funding through ApprovalController.
  • Ensures Money Account delegation readiness after approval.
  • Signs, validates, persists, and registers the subscription delegation.
  • Verifies that CHOMP reports the intent as active before creating the subscription.
  • Reuses compatible existing delegations where possible.
  • Revalidates trial eligibility before subscription creation.

This also:

  • Adds temporary local Money Account readiness contracts until the owning package exports them.
  • Adds canonical EIP-712 typed-data construction, hashing, authority decoding, and bundle fingerprinting.
  • Wires the required actions into the wallet initialization messenger.
  • Adds Approval Controller, signature utility, and hashing dependencies.
  • Expands unit coverage for approval validation, readiness changes, delegation reuse, CHOMP failures, and trial eligibility changes.

The authorization bundle is sent to confirmations so the complete effective permission set can be displayed. The local assertTrialEligibility guard is removed before the backend request.

References

Checklist

  • I've updated the test suite for new or updated code as appropriate
  • I've updated documentation (JSDoc, Markdown, etc.) for new or updated code as appropriate
  • I've communicated my changes to consumers by updating the package changelog
  • I've introduced breaking changes in this PR and have prepared draft pull requests for clients and consumer packages to resolve them

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant