xmtp / xps-gateway

XPS (XMTP Postal Service) JSON-RPC for xmtp-specific interactions with decentralized networks
https://xmtp.github.io/xps-gateway/
MIT License
2 stars 1 forks source link

Revoke Installation #38

Closed insipx closed 9 months ago

insipx commented 9 months ago

Closes #21

Has a companion https://github.com/xmtp/didethresolver/pull/35 , to add the logic of signing attributes/delegates/owners

changes the name parameter of the RPC to a XmtpAttribute, which is able to convert between the string representation of the attribute ("xmtp/installation/hex") and the byte [u8; 32] representation, which is taken directly from lib_didethresolver so that if the library type changes, it will be evident in the gateway via compilation error.

Other misc changes:

insipx commented 9 months ago

Looks like a good start!

I think the key type makes sense. I think there may be some missed opportunities to add test coverage here too.

yeah definitely still missing tests!

codecov[bot] commented 9 months ago

Codecov Report

Attention: 19 lines in your changes are missing coverage. Please review.

Comparison is base (ce75da2) 78.94% compared to head (1536bf5) 77.32%.

Files Patch % Lines
xps-gateway/src/rpc/methods.rs 66.66% 8 Missing :warning:
xps-gateway/src/lib.rs 0.00% 7 Missing :warning:
registry/src/lib.rs 92.59% 2 Missing :warning:
registry/src/error.rs 0.00% 1 Missing :warning:
xps-gateway/src/types.rs 94.73% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #38 +/- ## ========================================== - Coverage 78.94% 77.32% -1.63% ========================================== Files 9 10 +1 Lines 114 172 +58 ========================================== + Hits 90 133 +43 - Misses 24 39 +15 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.