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 delegation format and parse utility functions #28

Merged
merged 2 commits into from
Oct 28, 2024

Conversation

alanshaw
Copy link
Member

Adds 2 utility functions that 1) formate a delegation to a string and 2) parse a formatted string to a delegation.

The string representation is a base64pad multibase encoded CIDv1 with CAR codec + an identity multihash.

@alanshaw alanshaw force-pushed the feat/add-delegation-format-parse-utils branch 2 times, most recently from eaad283 to 258d6f3 Compare October 27, 2024 11:58
@alanshaw alanshaw force-pushed the feat/add-delegation-format-parse-utils branch from 258d6f3 to 42d9e1d Compare October 28, 2024 09:39
Copy link
Member

@hannahhoward hannahhoward left a comment

Choose a reason for hiding this comment

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

LGTM. Seperately, we should try to produce a human readable output functions at some point.

This PR allows completed effects to be included in a receipt. Similar to
[`Ran`](https://github.com/storacha/go-ucanto/blob/main/core/invocation/ran/ran.go),
an effect is now a union type - a link OR an invocation.

This allows a location commitment to be returned from a `blob/accept`
invocation. 🤔 Not sure I agree with using effects for this, but this is
how it is done currently.
@alanshaw alanshaw merged commit 34de8cd into main Oct 28, 2024
1 check passed
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