Skip to content

Trim decryption key received from keyper http#116

Merged
ylembachar merged 2 commits into
mainfrom
fix/trim_keyper_http_deckey
Apr 24, 2026
Merged

Trim decryption key received from keyper http#116
ylembachar merged 2 commits into
mainfrom
fix/trim_keyper_http_deckey

Conversation

@konradkonrad
Copy link
Copy Markdown
Contributor

The keyper http api at /decryptionKey/ encodes results as "0x + <DECRYPTION_KEY_HEX>" and serves them as Content-type: application/json. When receiving, we need to trim quotation and newlines, otherwise we will forward ill-formed results to our consumers, e.g.:

GET https://shutter-api.shutter.network/api/event/get_decryption_key?eon=13&identity=0xc744bee573e8f29e263c56fc0e46ef5f0b5ef3046da9c06bd2003164790c57e6

{"message":{"decryption_key":"\"0xb3c5f7a2e5bcbbda30602244b3a6d8ad361703b8990f1dcca58a4373099ca18b2ebb5e35196a17ba5f0b6969ae8530fb\"\n","identity":"0xc744bee573e8f29e263c56fc0e46ef5f0b5ef3046da9c06bd2003164790c57e6","decryption_timestamp":0}}

@konradkonrad konradkonrad force-pushed the fix/trim_keyper_http_deckey branch from 530098d to 766ee21 Compare April 23, 2026 11:50
@konradkonrad konradkonrad requested a review from ylembachar April 23, 2026 12:31
@ylembachar ylembachar merged commit 53aed87 into main Apr 24, 2026
@ylembachar ylembachar linked an issue Jun 4, 2026 that may be closed by this pull request
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.

Wrong decryption key JSON format

2 participants