Skip to content

v0.6.0

Latest

Choose a tag to compare

@alanshaw alanshaw released this 11 Sep 16:02
· 17 commits to main since this release
bfc1a5e

Adds a retrieval server and client allowing retrievals authorized via UCAN packed into HTTP headers. This leaves the response body free to be used for retrieved resource bytes!

There's even a working code example showing how it can be used: https://github.com/storacha/go-ucanto/tree/main/examples/retrieval

What's Changed

Full Changelog: v0.5.0...v0.6.0

BREAKING CHANGES

  1. core.car.Encode(...) now returns io.ReadCloser instead of io.Reader
  2. core.invocation.ran moved to core.receipt.ran since ran is a property of a receipt not an invocation.
  3. core.receipt.Receipt.Ran(...) now returns core.receipt.ran.Ran instead of core.invocation.Invocation. This allows us to build receipts where ran is just a link, not an actual invocation instance.
  4. core.message.NewMessage(...) now takes a single root CID instead of a slice.
  5. server.ServerView is now generic. It's type argument is the type of the service mapping. This is what allows a retrieval server to use much of the regular server code, while also allowing it's handler signatures to be different. server.NewServer(...) now returns a server.ServerView[server.Service].
  6. transport.car.NewCAROutboundCodec was renamed to transport.car.NewOutboundCodec since "car" is already in the package name.
  7. transport.car.NewCARInboundCodec was renamed to transport.car.NewInboundCodec since "car" is already in the package name.
  8. transport.http.HTTPResponse.Body() now returns io.ReadCloser instead of io.Reader
  9. transport.http.NewHTTPChannel was renamed to transport.http.NewChannel since "http" is already in the package name.
  10. transport.http.NewHTTPRequest was renamed to transport.http.NewRequest since "http" is already in the package name.
  11. transport.http.NewHTTPResponse was renamed to transport.http.NewResponse since "http" is already in the package name.