Skip to content

feat: Add /blob/list#2

Closed
Peeja wants to merge 1 commit into
fil-forge:mainfrom
Peeja:feat/blob/list
Closed

feat: Add /blob/list#2
Peeja wants to merge 1 commit into
fil-forge:mainfrom
Peeja:feat/blob/list

Conversation

@Peeja
Copy link
Copy Markdown
Contributor

@Peeja Peeja commented May 4, 2026

No description provided.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Can you live next to /blob/add instead? https://github.com/alanshaw/libracha/blob/main/capabilities/blob/add.go I have removed the /space prefix since we only added it in Storacha because existing clients did not have blob/* delegations.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Happy to!

Comment on lines +12 to +13
Before *string `cborgen:"before,omitempty" dagjsongen:"before,omitempty"`
After *string `cborgen:"after,omitempty" dagjsongen:"after,omitempty"`
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

🙏 Can we omit before & after? They complicate the store implementation and we do not use them in any of our tooling currently.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Absolutely. I'm just going by the spec, but that makes perfect sense.


type ListArgumentsModel struct {
Cursor *string `cborgen:"cursor,omitempty" dagjsongen:"cursor,omitempty"`
Size *uint64 `cborgen:"size,omitempty" dagjsongen:"size,omitempty"`
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This will probably have to be an int64 - IPLD does not support uint https://ipld.io/docs/data-model/kinds/

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Ah! Good to know.

alanshaw added a commit that referenced this pull request May 11, 2026
Cherry picks from #2 and adds
the remaining missing capabilities.

Also, (sorry!) removes the `CborTime` type. This is unnecessarily
accurate (to nanoseconds) and was being used to specify expiry time of a
UCAN, which has a resolution of seconds, so was unnecessary.

Moves error definitions from Sprue to the library so that they can be
used in clients to disambiguate invocation errors.

Upgrades `dag-json-gen` dependency and re-generates `dag-json`
serializers/deserializers. Error messages are a lot more informative,
and avoid linter complains about capitalization.

Ports `jobqueue` and `bytemap` from `storacha/go-libstoracha`.

---------

Co-authored-by: Petra Jaros <peeja@peeja.com>
alanshaw added a commit that referenced this pull request May 11, 2026
Adds a function that gets attestations for a given set of proofs for an
invocation.

i.e. you call `ProofChain(..)` and then pass the proofs you recieve to
`ProofAttestations(...)` to get any needed attestations.

I have also refactored the interfaces for dependencies to proof chain -
they are now function types and not interfaces (which should actually be
a bit easier to pass in) and have also been renamed. What was a "finder"
is now a "lister", but "matcher" stays the same. The reason is that
"finder" and "matcher" are a bit too similar (and actually have the same
signature for their functions), "finder" (now "lister") gets delegations
with the EXACT parameters, whereas "matcher" gets delegations that
_match_ the parameters. e.g. subject could be an exact match or it could
be `nil` (for a powerline delegation) and command could be an exact
match on `/msg/send` or it could be `/msg` or `/`.

Cherry picks from #2 and adds
the remaining missing capabilities.

Also, (sorry!) removes the `CborTime` type. This is unnecessarily
accurate (to nanoseconds) and was being used to specify expiry time of a
UCAN, which has a resolution of seconds, so was unnecessary.

Moves error definitions from Sprue to the library so that they can be
used in clients to disambiguate invocation errors.

Upgrades `dag-json-gen` dependency and re-generates `dag-json`
serializers/deserializers. Error messages are a lot more informative,
and avoid linter complains about capitalization.

Ports `jobqueue` and `bytemap` from `storacha/go-libstoracha`.

---------

Co-authored-by: Petra Jaros <peeja@peeja.com>
alanshaw added a commit that referenced this pull request May 11, 2026
This PR adds capabilities to enable login to the Forge network via
email. Also stashing/claiming delegations to spaces.

Differences from UCAN 0.9:

* Renamed `access/authorize` to `/access/request`. This was the desired
name originally but a previous iteration of the service already took
`access/request` so we had to choose something different.
* `/access/request` return value now includes a promise value - the
confirmation task CID. In UCAN 0.9 effects are communicated outside of
the arguments so this is only seen in the [implementation for
`access/authorize`](https://github.com/storacha/upload-service/blob/674e273f3d928bdd9212f128f490afe45368b4a4/packages/upload-api/src/access/authorize.js#L125-L127)
not the capability definition.
* `/access/claim` and `/access/confirm` return a list of CIDs of
delegations instead of a map of bytes. These capabilities were
originally created before we had the ability to return other blocks in
the response in addition to the receipt block, so it necessitated
encoding the delegation directly in the receipt. Now the delegations can
be sent in the response container.

Adds a function that gets attestations for a given set of proofs for an
invocation.

i.e. you call `ProofChain(..)` and then pass the proofs you recieve to
`ProofAttestations(...)` to get any needed attestations.

I have also refactored the interfaces for dependencies to proof chain -
they are now function types and not interfaces (which should actually be
a bit easier to pass in) and have also been renamed. What was a "finder"
is now a "lister", but "matcher" stays the same. The reason is that
"finder" and "matcher" are a bit too similar (and actually have the same
signature for their functions), "finder" (now "lister") gets delegations
with the EXACT parameters, whereas "matcher" gets delegations that
_match_ the parameters. e.g. subject could be an exact match or it could
be `nil` (for a powerline delegation) and command could be an exact
match on `/msg/send` or it could be `/msg` or `/`.

Cherry picks from #2 and adds
the remaining missing capabilities.

Also, (sorry!) removes the `CborTime` type. This is unnecessarily
accurate (to nanoseconds) and was being used to specify expiry time of a
UCAN, which has a resolution of seconds, so was unnecessary.

Moves error definitions from Sprue to the library so that they can be
used in clients to disambiguate invocation errors.

Upgrades `dag-json-gen` dependency and re-generates `dag-json`
serializers/deserializers. Error messages are a lot more informative,
and avoid linter complains about capitalization.

Ports `jobqueue` and `bytemap` from `storacha/go-libstoracha`.

---------

Co-authored-by: Petra Jaros <peeja@peeja.com>
@alanshaw alanshaw closed this May 11, 2026
@alanshaw
Copy link
Copy Markdown
Member

Cherry picked into #6

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