-
Notifications
You must be signed in to change notification settings - Fork 14
Add subscription functionality to payment interface #100
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
✅ Heimdall Review Status
|
Review Error for Yzaik05 @ 2025-08-23 11:21:38 UTC |
* @param options.testnet - Whether to use Base Sepolia testnet (default: false) | ||
* @param options.walletUrl - Optional wallet URL to use | ||
* @param options.telemetry - Whether to enable telemetry logging (default: true) |
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.
do you think this would make more sense in a nested param, since these are more sdk config focused rather than affecting the behavior of the subscribe functioanlity?
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.
That's a valid consideration and I don't think there's a direct right answer - but I would be inclined to leave as is for now and add a nested param if a flat call starts to feel over-encumbered as we add more configurability down the road.
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, left a comment
@@ -52,7 +52,7 @@ const getHashFn = async ({ | |||
|
|||
if (!client) { | |||
throw new Error( | |||
`No client found for chain ID ${chainId}. Please ensure SDK is in connected state` | |||
`No client found for chain ID ${chainId}. Chain not supported or RPC URL not available` |
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.
nit: i think mentioning SDK connected state is also helpful, SDK connection gets the RPC URL from FE
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.
Right - yeah maybe there's a way to phrase this like "Chain not supported or RPC URL not available - SDK may be in a disconnected state"
5833141
to
1c322cb
Compare
Summary
Added subscription functionality to the payment interface using spend permissions. This enables applications to create recurring payment subscriptions on Base network with USDC.
Key changes:
subscribe()
function in payment interface that creates spend permissions for recurring paymentsHow did you test your changes?
Unit test coverage includes:
All CI checks pass:
Manual testing: