-
Notifications
You must be signed in to change notification settings - Fork 8
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
Add DID resolve to web5 cmd #77
Conversation
return err | ||
} | ||
|
||
fmt.Println(string(jsonDID)) |
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.
makes me wonder if this needs some sort of message or prettifying
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.
Yeah right now we're json.MarshalIndent()
ing to make it pretty, but we could push this down to the SDK-level
Tangentially, I have a ticket for adding CLI args so the user can direct formatting #64
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.
How were you thinking about exposing this at the sdk level @KendallWeihe ?
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.
Good point, reiterating that the CLI is merely a wrapper around SDK functionality (it doesn't extend it)
@@ -12,7 +11,7 @@ type didWebCreate struct { | |||
Domain string `arg:"" help:"The domain name for the DID." required:""` | |||
} | |||
|
|||
func (c *didWebCreate) Run(_ context.Context) error { |
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.
Also found out (per PR feedback) we don't need these, Kong will dynamically inject based on needs
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.
Add to cmd/web5/README.md
?
Also, I didn't realize we're building a CLI. Why are we now creating a web5 CLI even though we weren't considering that AFAIK when we built other implementations?
I'm not sure of the intent, but Go is almost ideal for writing redistributable CLIs as it generates statically linked completely self-contained executables, so if we want a single CLI then this makes sense vs. being in another language. Rust would also be a good choice for the same reasons. |
@diehuxx it wasn't something that we necessarily deliberated. Happened a bit organically. 2 primary reasons.
Further I imagine being able to use a cli for updating / managing a did in general will be helpful. Especially given that it'll be able to use aws KMS quite easily |
Re: question in description Makes sense @KendallWeihe was actually thinking the same thing re: args ideally we can surface method specific command line options & args based on the options we've surfaced at the sdk level |
A bit tangential, but I can highly recommend goreleaser for building and releasing Go binaries. It will automatically build and upload to GH releases. FTL uses it, for example. |
Done, thanks! Though that README is kinda bleh, not sure what would be ideal there, but a problem for later. |
Something very strange is going on. Tests are failing on this branch; the I suspect we have some weird cryptographic issue going on where something to do with this particular commit, and the random generation made available in our GitHub Pipelines. Going to merge this in and open a ticket. |
totally agree #85 |
Closes #70
Usage
For example, run
web5 did:jwk create
, and use theuri
from the output as the input to the resolve commandCommentary
I think I may redo the DX for the
did:jwk
anddid:web
to beweb5 did create <method> <additional args>
... @mistermoe thoughts? My driving reason is to try and match the namespacing in our various web SDKs (specifically looking at web5-js as the most mature among them)I want to be able to resolve a DID with just the URI, so I would want the create commands to be consistent with this DX as well