Skip to content

feat: verify CoinCover safe roots at creation and mint - #10319

Draft
davidkaplanbitgo wants to merge 1 commit into
masterfrom
davidkaplan/wcn-4946-verify-roots-creation-and-mint
Draft

davidkaplanbitgo wants to merge 1 commit into
masterfrom
davidkaplan/wcn-4946-verify-roots-creation-and-mint

Conversation

@davidkaplanbitgo

Copy link
Copy Markdown
Contributor

Ticket: WCN-4946

The SDK must not take wallet-platform's word that a safe backup root came from CoinCover.

What

  • Keychain carries the provider's signedPayload and signature alongside provider and keyId (WP-7 returns them in the key JSON).
  • createSafeKeys verifies every provider-held backup root before the triplets are assembled. A bad proof archives the safe and throws, so it never reaches finalize.
  • The onchain createWallet path re-verifies the root's proof and checks the minted backup child is the soft derivation of that root at the wallet path before returning the wallet. TSS mint is untouched.

Stacked — do not merge before its prerequisites

This PR is written against two branches that are not on master yet:

Consequently CI is expected to fail on this branch until both land. Merge order: #10317 → #10318 → this. After they merge, rebase this branch on master and the diff is the five files shown.

Review notes

  • Nothing was built or run locally. The stated verification order assumes WP returns provider, keyId, signedPayload and signature flat on the key; if WP nests them under providerMetadata this fails loudly with "missing its pub, key id, signed payload or signature" rather than skipping the check.

- Keychain carries the provider's signedPayload and signature alongside provider
  and keyId.
- createSafeKeys verifies every provider-held backup root before the triplets
  are assembled; a bad proof archives the safe and throws, so it never
  finalizes.
- The onchain createWallet path re-verifies the root and checks the minted
  backup child is its soft derivation at the wallet path before returning the
  wallet.

Stacked on the verifier (WCN-4832) and the provider option (WCN-3884).

Ticket: WCN-4946
@linear-code

linear-code Bot commented Dec 4, 2026

Copy link
Copy Markdown
Contributor

WCN-4946

@github-actions

github-actions Bot commented Dec 4, 2026

Copy link
Copy Markdown
Contributor

⚠️ Compatibility checks are failing on Node.js 27-nightly (experimental, non-blocking). This does not block merge, but it signals an incompatibility to fix before this release becomes supported.

View run

This branch has not been deployed

No deployments
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.

1 participant