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 flag to output signer key signature in JSON #4580

Merged
merged 7 commits into from Apr 2, 2024

Conversation

hstove
Copy link
Contributor

@hstove hstove commented Mar 22, 2024

This PR adds a new (optional) flag, --json, to the generate-stacking-signature command in stacks-signer. If specified, the CLI will output all the relevant information in JSON form.

The utility of this JSON is that Stacking apps can add a simple "paste JSON" field, which then auto-fills the relevant fields. Because there is a lot of information that must be shared between the signer and stacker, providing this "standard" can help reduce mistakes.

This "paste JSON" functionality is also already implemented in a beta version of Lockstacks:

image

@hstove hstove requested review from jferrant and 8marz8 March 22, 2024 17:40
8marz8
8marz8 previously approved these changes Mar 22, 2024
Copy link

codecov bot commented Mar 22, 2024

Codecov Report

Attention: Patch coverage is 30.00000% with 14 lines in your changes are missing coverage. Please review.

Project coverage is 77.83%. Comparing base (c26e00c) to head (37258ee).

Additional details and impacted files
@@            Coverage Diff             @@
##             next    #4580      +/-   ##
==========================================
- Coverage   83.35%   77.83%   -5.53%     
==========================================
  Files         470      470              
  Lines      332256   332271      +15     
  Branches      317      317              
==========================================
- Hits       276953   258616   -18337     
- Misses      55295    73647   +18352     
  Partials        8        8              
Files Coverage Δ
stacks-signer/src/cli.rs 63.01% <0.00%> (-0.29%) ⬇️
stacks-signer/src/main.rs 15.15% <31.57%> (-20.54%) ⬇️

... and 192 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c26e00c...37258ee. Read the comment docs.

jferrant
jferrant previously approved these changes Mar 28, 2024
@saralab saralab requested a review from kantai March 28, 2024 13:57
@hstove hstove linked an issue Mar 28, 2024 that may be closed by this pull request
kantai
kantai previously approved these changes Mar 28, 2024
stacks-signer/src/main.rs Outdated Show resolved Hide resolved
@hstove hstove dismissed stale reviews from 8marz8, jferrant, and kantai via 37258ee April 1, 2024 17:24
@hstove
Copy link
Contributor Author

hstove commented Apr 1, 2024

I've updated the log line to not pretty-print the JSON. @xoloki @jcnelson @jferrant would you mind giving this a re-review? 🙏

@hstove hstove enabled auto-merge April 1, 2024 17:26
@hstove hstove added this pull request to the merge queue Apr 2, 2024
Merged via the queue into next with commit 132ced0 Apr 2, 2024
1 of 2 checks passed
@hstove hstove deleted the feat/signer-signature-json branch April 2, 2024 14:59
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.

Add JSON output for stacking signature generated via stacks-signer
6 participants