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

feat: add specification for UCAN HTTP bridge #112

Merged
merged 7 commits into from
Mar 5, 2024
Merged

Conversation

travis
Copy link
Member

@travis travis commented Feb 26, 2024

To support users in languages that do not have existing UCAN invocation implementations, we are going to launch a bridge that allows them to make simple HTTP requests with JSON bodies that we transform into proper UCAN invocations.

To support users in languages that do not have existing UCAN invocation implementations, we are going to launch a bridge that allows them to make simple HTTP requests with JSON bodies that we transform into proper UCAN invocations.
@travis travis changed the title feat: add specificastion for UCAN HTTP bridge feat: add specification for UCAN HTTP bridge Feb 26, 2024
it's 403ing from CI, presumably because stackoverflow is trying to outwit the robots
w3-ucan-bridge.md Show resolved Hide resolved
w3-ucan-bridge.md Outdated Show resolved Hide resolved
w3-ucan-bridge.md Outdated Show resolved Hide resolved
w3-ucan-bridge.md Show resolved Hide resolved
w3-ucan-bridge.md Outdated Show resolved Hide resolved
w3-ucan-bridge.md Outdated Show resolved Hide resolved
w3-ucan-bridge.md Outdated Show resolved Hide resolved
w3-ucan-bridge.md Show resolved Hide resolved
@travis travis requested a review from alanshaw March 5, 2024 00:49
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.

I approved anyway but you just need to update the naming for receipt fields earlier in the document.

]
```

A UCAN bridge receipt has two fields, `data` and `sig`:
Copy link
Member

Choose a reason for hiding this comment

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

Needs to be changed to d and s as you did below.

@travis travis merged commit 5440717 into main Mar 5, 2024
2 checks passed
@travis travis deleted the feat/ucan-bridge branch March 5, 2024 17:52
travis added a commit to storacha/w3infra that referenced this pull request Mar 5, 2024
To support users in languages that do not have existing UCAN invocation
implementations, we are going to launch a bridge that allows them to
make simple HTTP requests with JSON bodies that we transform into proper
UCAN invocations.

This follows the specification here:
storacha/specs#112

Values for authorization headers can be generated using the `bridge
generate-tokens` w3cli command proposed here:

storacha/w3cli#175

- [x] factor core bridge logic out to a separate library (filed as
#338)
- [x] factor HTTP input wrangling out to a separate function
- [x] rename `UPLOAD_API_DID` and `ACCESS_SERVICE_URL` environment
variables to `W3UP_SERVICE_DID` and `W3UP_SERVICE_URL` (filed as
#337)
- [x] add tests
- [x] expand and formalize bridge specification, move it to the specs
repo (done - storacha/specs#112)
- [x] document response format
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