-
Notifications
You must be signed in to change notification settings - Fork 23
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: use new ucanto allows api for canDelegateCapability
and implement space registration
#539
feat: use new ucanto allows api for canDelegateCapability
and implement space registration
#539
Conversation
This reverts commit f4ad371.
…lement-access-authorize-in-agent-new-ucanto
Motivation: * do the upgrade so that we can merge #539 after (which requires the upgrade)
Motivation: * do the upgrade so that we can merge #539 after (which requires the upgrade)
…lement-access-authorize-in-agent-new-ucanto
canDelegateCapability
canDelegateCapability
canDelegateCapability
and implement space registration
packages/access-client/src/agent.js
Outdated
* @param {Ucanto.Principal<Ucanto.DID<'key'>>} device | ||
*/ | ||
async function createSpaceSaysDeviceCanAccessDelegateWithSpace(space, device) { | ||
async function createSpaceSaysDeviceCanAccessDelegateWithSpace( |
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.
may want to call this function now/soon createIssuerSays...
since the authorization will now no longer always be from Space.
packages/access-client/src/agent.js
Outdated
}, | ||
}) | ||
} | ||
|
||
/** | ||
* | ||
* @param {Signer.EdSigner} space - TODO is this type correct? | ||
* @param {Ucanto.DID} space - TODO is this type correct? |
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.
this can be Ucanto.DID<'key'>
but also can change after merge
canDelegateAbility(parent.can, child.can) | ||
) { | ||
return true | ||
// @ts-ignore ignore this until we bring in ucanto as a normal dependency rather than linking to a local version |
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.
We should be able to remove this right?
Motivation: * do the upgrade so that we can merge #539 after (which requires the upgrade)
…ment space registration (#539) * use the new `allows` function in `ucanto` to reimplemeent `canDelegateCapability` * move space registration from `newCreateSpace` to `registerSpace` where it belongs * use agent's current account in registerSpace rather than requiring an email --------- Co-authored-by: Benjamin Goering <[email protected]>
🤖 I have created a release *beep* *boop* --- ## [5.0.0](storacha/w3ui@keyring-core-v4.2.0...keyring-core-v5.0.0) (2023-07-25) ### ⚠ BREAKING CHANGES * upgrade access client, ucanto and other packages ([storacha#530](storacha/w3ui#530)) ### Features * upgrade access client, ucanto and other packages ([storacha#530](storacha/w3ui#530)) ([8e7321b](storacha/w3ui@8e7321b)) --- 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* --- ## [5.0.0](storacha/w3ui@keyring-core-v4.2.0...keyring-core-v5.0.0) (2023-07-25) ### ⚠ BREAKING CHANGES * upgrade access client, ucanto and other packages ([storacha#530](storacha/w3ui#530)) ### Features * upgrade access client, ucanto and other packages ([storacha#530](storacha/w3ui#530)) ([4449018](storacha/w3ui@4449018)) --- 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>
allows
function inucanto
to reimplemeentcanDelegateCapability
newCreateSpace
toregisterSpace
where it belongs