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: upload client should perform filecoin offer #1333

Merged
merged 4 commits into from
Mar 21, 2024

Conversation

vasco-santos
Copy link
Contributor

In context of storacha/project-tracking#25 and storacha/w3infra#344 we set the client to perform filecoin/offer already so that new users, as well as users that upgrade in the meantime can already perform this, in order to better prepare us to get rid of bucket event

@vasco-santos vasco-santos force-pushed the fix/upload-client-should-perform-filecoin-offer branch 2 times, most recently from 24b95d2 to 00efec2 Compare March 20, 2024 11:45
@vasco-santos vasco-santos force-pushed the fix/upload-client-should-perform-filecoin-offer branch from 00efec2 to 6f67eee Compare March 20, 2024 11:54
@@ -93,7 +94,7 @@ export interface ProgressStatus extends XHRProgressStatus {

export type ProgressFn = (status: ProgressStatus) => void

export interface Service {
export interface Service extends StorefrontService {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

adds storefront capabilities as implemented by upload-api per https://github.com/web3-storage/w3up/blob/main/packages/upload-api/src/types.ts#L164

Copy link
Member

@alanshaw alanshaw left a comment

Choose a reason for hiding this comment

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

LGTM!

issuer: conf.issuer,
audience: conf.audience,
// Resource of storefront is the issuer did
with: conf.issuer.did(),
Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Contributor Author

@vasco-santos vasco-santos Mar 21, 2024

Choose a reason for hiding this comment

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

my comment is actually also wrong, the did must be the same as the issuer in order to have a self issued invocation.. Otherwise you would need to either have been delegated such capability or inline proofs given resource is not did of issuer.

packages/upload-client/src/index.js Outdated Show resolved Hide resolved
@vasco-santos vasco-santos merged commit 466e3f7 into main Mar 21, 2024
14 checks passed
@vasco-santos vasco-santos deleted the fix/upload-client-should-perform-filecoin-offer branch March 21, 2024 11:30
vasco-santos added a commit that referenced this pull request Mar 21, 2024
🤖 I have created a release *beep* *boop*
---


##
[13.1.0](upload-client-v13.0.1...upload-client-v13.1.0)
(2024-03-21)


### Features

* byo piece hasher
([#1323](#1323))
([fe2e3d5](fe2e3d5))
* non-parallel piece hashing and CAR upload
([#1305](#1305))
([7a6385b](7a6385b))
* upgrade ucanto/transport to 9.1.0 in all packages to get more verbose
errors from HTTP transport on non-ok response
([#1312](#1312))
([d6978d7](d6978d7))


### Fixes

* upload client should perform filecoin offer
([#1333](#1333))
([466e3f7](466e3f7))

---
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: Vasco Santos <[email protected]>
vasco-santos added a commit that referenced this pull request Mar 21, 2024
🤖 I have created a release *beep* *boop*
---


##
[12.5.0](w3up-client-v12.4.1...w3up-client-v12.5.0)
(2024-03-21)


### Features

* upgrade ucanto/transport to 9.1.0 in all packages to get more verbose
errors from HTTP transport on non-ok response
([#1312](#1312))
([d6978d7](d6978d7))


### Fixes

* upload client should perform filecoin offer
([#1333](#1333))
([466e3f7](466e3f7))

---
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: Vasco Santos <[email protected]>
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