Skip to content

fix(awm): tighten mpc response codecs - #261

Open
pranavjain97 wants to merge 2 commits into
masterfrom
pranavjain/harden-awm-response-codecs
Open

fix(awm): tighten mpc response codecs#261
pranavjain97 wants to merge 2 commits into
masterfrom
pranavjain/harden-awm-response-codecs

Conversation

@pranavjain97

@pranavjain97 pranavjain97 commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Drop combinedKey from the EdDSA MPC finalize handler return. It's an intermediate from keyCombine that's not consumed by any caller (MBE only reads commonKeychain and counterpartyKeyShare).
  • Wrap AWM MPC response codecs in t.exact so encoded responses match their declared contracts. Covers v1/v2 initialize/finalize and mpc recovery. SignMpcResponse union left as-is — its t.any field codecs
    cause union-match regression when wrapped strictly; tracked separately.

Ticket: WCN-1926

Drop combinedKey from the EdDSA MPC finalize handler return. It's an
intermediate value from keyCombine that isn't consumed by any caller
(MBE only reads commonKeychain and counterpartyKeyShare), and it was
passing through io-ts identity encoding on the non-exact response
codec.

Wrap MpcFinalizeResponseType in t.exact so the codec matches the
declared contract at the JSON boundary. Tests updated accordingly.

WCN-1926
Wrap the remaining AWM MPC response codecs in t.exact so any undeclared
fields are stripped at the JSON boundary. Applies to initialize/finalize
for v1 and v2, plus mpc recovery. SignMpc union is intentionally left as
non-exact because its branches use t.any field codecs; tightening those
requires narrowing the field shapes and is tracked separately.
@pranavjain97
pranavjain97 requested review from a team as code owners August 6, 2026 20:52
@danielpeng1

Copy link
Copy Markdown
Contributor

lgtm; add description

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.

3 participants