Skip to content
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

fix: compatibility with legacy w3up client #59

Merged
merged 4 commits into from
Nov 27, 2024
Merged

Conversation

alanshaw
Copy link
Member

This PR allows upload-service to work with the legacy client (@web3-storage/w3up-client).

The new service uses blob/allocate and blob/accept capabilities when talking to storage nodes. For some reason I thought these were not referenced by the client but they are....except via their old names web3.storage/blob/allocate and web3.storage/blob/accept 🤦

This PR adds additional effects to the blob/add receipt, essentially "fake" web3.storage/blob/allocate and web3.storage/blob/accept delegations that contain the same information as their blob/allocate and blob/accept counterparts. It allows old clients to use the old capability names and the new clients to use the new ones.

We can remove these additional effects when we are satisfied enough clients have moved to @storacha/client.

@alanshaw alanshaw requested a review from Peeja November 27, 2024 14:59
Copy link
Member

@Peeja Peeja left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks! There's a test failure that looks like it might just need the expected value updated, but other than that 🚢.

@@ -1,5 +1,4 @@
import { ed25519 } from '@ucanto/principal'
import { conclude } from '@storacha/capabilities/ucan'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

praise: Nice. 😄

@alanshaw alanshaw merged commit 7185046 into main Nov 27, 2024
17 checks passed
@alanshaw alanshaw deleted the fix/legacy-compat branch November 27, 2024 15:57
alanshaw pushed a commit that referenced this pull request Nov 27, 2024
🤖 I have created a release *beep* *boop*
---


##
[1.1.4](upload-api-v1.1.3...upload-api-v1.1.4)
(2024-11-27)


### Fixes

* compatibility with legacy w3up client
([#59](#59))
([7185046](7185046))

---
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>
Peeja added a commit that referenced this pull request Nov 29, 2024
🤖 I have created a release *beep* *boop*
---


##
[1.0.3](client-v1.0.2...client-v1.0.3)
(2024-11-27)


### Fixes

* compatibility with legacy w3up client
([#59](#59))
([7185046](7185046))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).
Peeja added a commit that referenced this pull request Nov 29, 2024
🤖 I have created a release *beep* *boop*
---


##
[1.0.3](client-v1.0.2...client-v1.0.3)
(2024-11-29)


### Fixes

* compatibility with legacy w3up client
([#59](#59))
([7185046](7185046))


### Other Changes

* **main:** release client 1.0.3
([b0ccad7](b0ccad7))
* **main:** release client 1.0.3
([#79](#79))
([7c336f2](7c336f2))
* Revert "chore(main): release client 1.0.3"
([#84](#84))
([2f354c4](2f354c4))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).
fforbeck pushed a commit that referenced this pull request Dec 19, 2024
🤖 I have created a release *beep* *boop*
---


##
[1.0.2](upload-client-v1.0.1...upload-client-v1.0.2)
(2024-12-02)


### Fixes

* compatibility with legacy w3up client
([#59](#59))
([7185046](7185046))
* jsdoc
([5506c11](5506c11))
* overflow slices
([storacha#1595](https://github.com/storacha/upload-service/issues/1595))
([949b84a](949b84a))
* thanks prettier
([11e34b4](11e34b4))
* trigger release
([f0f9a56](f0f9a56))


### Other Changes

* prettier
([40ebc05](40ebc05))

---
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>
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.

2 participants