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: update http put args description #117

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 21 additions & 3 deletions w3-blob.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,15 @@

![status:wip](https://img.shields.io/badge/status-wip-orange.svg?style=flat-square)

## Editors

- [Irakli Gozalishvili](https://github.com/gozala)
- [Vasco Santos](https://github.com/vasco-santos)

## Authors

- [Irakli Gozalishvili](https://github.com/gozala)
- [Vasco Santos](https://github.com/vasco-santos)

## Abstract

Expand Down Expand Up @@ -162,7 +166,13 @@ Shows an example receipt for the above `/space/content/add/blob` capability invo
"cmd": "/http/put",
"sub": "did:key:zMh...der", // <-- Ed299.. derived key from content multihash
"args": {
"content": { "/": { "bytes": "mEi...sfKg" } },
"body": {
// multihash of the blob as byte array
"content": { "/": { "bytes": "mEi...sfKg" } },
// size of the blob in bytes
"size": 2_097_152,
}
// TODO: this should now be updated?
"address": { "await/ok": { "/": "bafy...alloc" } },
Comment on lines +175 to 176
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@Gozala this ended up changing below to use url and headers https://github.com/web3-storage/specs/blob/main/w3-blob.md#put-blob-capability-schema

I honestly liked more the previous alignment here with address, but happy to change this if you have strong preference to use url and header top level

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I assume if so, we would like to have something along the lines of

'ucan/await': ['.out.ok.claim', acceptfx.link()],

Copy link
Collaborator

Choose a reason for hiding this comment

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

I end up updating it here https://github.com/web3-storage/specs/pull/118/files last week but forgot to submit a PR for the review. I do not feel very strongly about it, however I find { url, headers, body } to be more obvious choice for http/put than { address, body }.

"_allocate": { "await/ok": { "/": "bafy...alloc" } }
},
Expand Down Expand Up @@ -386,9 +396,17 @@ The subject field SHOULD be [`did:key`] corresponding to the [Ed25519] private k

Metadata MUST contain `keys` field with an object value that contains [`did:key`] subject as key and corresponding private key as bytes as a value.

### Put Blob Address
### Put Blob Body

The `args.body` field MUST be set to the Blob the space is allocated for.

### Put Blob URL

The `args.url` field MUST be set to the HTTP(S) location that can receive blob content via HTTP PUT request.

### Put Blob Headers

Destination address `url` and required `headers` MUST be specified in the arguments.
The `args.url` field MUST be set to the HTTP(S) headers required to send blob content via HTTP PUT request.

### Put Blob Receipt

Expand Down
Loading