-
Notifications
You must be signed in to change notification settings - Fork 22
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
Replace @id w/ f:ledger in transactions #578
Conversation
...for identifying the ledger. This is more semantically correct and fixes an issue with these not necessarily being IRIs which broke credential verification. Also adds context-type to connection protocol and looks it up from there in transact instead of making it an opt passed separately and redundantly.
src/fluree/db/json_ld/api.cljc
Outdated
Returns the new db. | ||
|
||
Note: Loading the ledger results in a new ledger object, so references to existing | ||
ledger objects will be rendered stale. To obtain a ledger with the new changes, | ||
call `load` on the ledger alias." | ||
[conn json-ld opts] | ||
[conn json-ld] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like opts
is also used by h-a-g to pass in the :did
: https://github.com/fluree/http-api-gateway/blob/main/src/fluree/http_api/handlers/ledger.clj#L81-L85, is that going to be an issue?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, thanks. I just searched this codebase. I'll add that back in.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It'd be nice if someday we enumerated what the possible opts
are for our top-level api fns 😄
It's used by HTTP API code
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛸
@mpoffald Sorry I added one more commit to get the h-a-g test suite passing (and I think it's more correct overall regardless). Mind taking a quick extra look at that? |
LGTM! |
...for identifying the ledger. This is more semantically correct and fixes an issue with these not necessarily being IRIs which broke credential verification.
Also adds context-type to connection protocol and looks it up from there in transact instead of making it an opt passed separately and redundantly.
Upcoming server & http-api-gateway PRs will adapt them to this change.
Part of https://github.com/fluree/core/issues/32