-
Notifications
You must be signed in to change notification settings - Fork 22
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
feat!: Update voucher API #163
Conversation
Deploying with
|
Latest commit: |
e25205a
|
Status: | ✅ Deploy successful! |
Preview URL: | https://13dfe1b1.ucan-protocol.pages.dev |
Branch Preview URL: | https://feat-voucher-v2.ucan-protocol.pages.dev |
9be6ed8
to
55e828f
Compare
I'm also starting to think that maybe we don't need |
// provider DID. | ||
const products = new Map([ | ||
[ | ||
ctx.signer.did(), |
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.
Should we create a separate DID for this? This is the DID of the service no?
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.
In practice I think we should have DID per product, that said I was not sure what the best way to thread that through, so I thought this was reasonable compromise to get at least discussion started.
900c28e
to
6496773
Compare
After thinking about treading through delegations from voucher -> service I've realized there are bunch of complications:
Since #182 will basically address all the above, I'm going to pause it for now and resume it afterwards |
🤖 I have created a release *beep* *boop* --- ## [3.0.0](storacha/w3ui@solid-uploader-v2.1.2...solid-uploader-v3.0.0) (2022-12-15) ### ⚠ BREAKING CHANGES * core and framework components have changed considerably. Please read the updated doucmentation. ### Features * consume access and upload client ([storacha#159](storacha/w3ui#159)) ([e36d842](storacha/w3ui@e36d842)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
🤖 I have created a release *beep* *boop* --- ## [3.0.0](storacha/w3ui@solid-uploader-v2.1.2...solid-uploader-v3.0.0) (2022-12-15) ### ⚠ BREAKING CHANGES * core and framework components have changed considerably. Please read the updated doucmentation. ### Features * consume access and upload client ([storacha#159](storacha/w3ui#159)) ([dc086fd](storacha/w3ui@dc086fd)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
it turns out Stripe already adds the `checkout.session` query param to this URL - this means we don't even need to update Stripe to fix this!
🤖 I have created a release *beep* *boop* --- ## [1.16.1](storacha/console@w3console-v1.16.0...w3console-v1.16.1) (2024-12-12) ### Bug Fixes * make it possible to skip the plan gate after Stripe checkout ([storacha#162](storacha/console#162)) ([b399b37](storacha/console@b399b37)) * tweak plan gate query param ([storacha#163](storacha/console#163)) ([0ce071e](storacha/console@0ce071e)) ### Other Changes * update copy ([storacha#159](storacha/console#159)) ([0253b05](storacha/console@0253b05)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Overview
Originally voucher spec used:
nb.of
(namednb.product
here) to identify a product.nb.at
(namednb.service
here) to identify a provider service of the product.with
field invoucher/redeem
was basically web3.storage did so it could self-issued.With this change we simplify things by:
vouche/redeem
used product DID in thewith
field, which in turn implies product owner should delegate capability to the validator.Background
I realized that we could simply identify products via did:key, which in turns remove need for both
nb.of
andnb.at
fields. Not only it simplifies things it also means that any one could create a product (not just us but also our users) and likewise anyone could install any product as long as product owner delegated that capability by whatever means.upload/list
we just need to save products in the list product list and only change account settings based on products we're aware of.