Skip to content

Add SNIP draft: Pluggable Signer Interface for Smart Accounts#175

Open
haycarlitos wants to merge 1 commit into
starknet-io:mainfrom
haycarlitos:snip-pluggable-signer
Open

Add SNIP draft: Pluggable Signer Interface for Smart Accounts#175
haycarlitos wants to merge 1 commit into
starknet-io:mainfrom
haycarlitos:snip-pluggable-signer

Conversation

@haycarlitos
Copy link
Copy Markdown
Contributor

Summary

Adds a Draft SNIP defining a curve-agnostic ISigner trait, a canonical kind-tag registry, and a tagged signature envelope so that one Starknet smart-account class can verify signatures from Phantom (Ed25519), MetaMask (secp256k1 / EIP-191 / EIP-712), passkeys (WebAuthn P-256), hardware wallets (P-256), OAuth providers (JWT-ES256), email (DKIM-RSA), validator keys (BLS12-381), and native STARK wallets — without forking the account contract per curve.

Motivation

Every Starknet account that ships a non-STARK signer today forks a reference implementation and writes curve-specific validation inline, so no two account classes interoperate. The April 2026 security review of the Shhh wallet (report) found three issues (H-2 SRC-5 interface mismatch, M-1 caller-sentinel ambiguity, I-1 custom calls-hash) that all traced to the same root cause: there is no standard way for an account to declare which curve its owner uses. This SNIP is that standard.

It is the authentication-layer companion to the Session Keys SNIP (PR #163, co-authored by @omarespejel), which standardizes authorization. Session keys answer "what may this delegated key do?"; this SNIP answers "which curve is the owner on, and how is it verified?" The two compose into a complete modular-account stack.

What's in the SNIP

  • Part AISigner trait (verify / kind / validate_pubkey).
  • Part B — canonical kind-tag registry. Tier 1: STARK, SECP256K1, ED25519, P256, RSA_2048, BLS12_381. Tier 2: WEBAUTHN_P256, EIP191_SECP256K1, EIP712_SECP256K1, DKIM_RSA, JWT_RS256, JWT_ES256. Tier 3 reserved: ZK_JWT, ZK_EMAIL, ZK_TLS, ZK_TOTP.
  • Part C — signature envelope [kind_tag, payload...] so paymasters dispatch without off-chain negotiation.
  • Part D — SNIP-9 V2 integration with SNIP-12 typed data as the primary hash.
  • Part E — address-salt binding poseidon(primary_kind, owner_commitment) to prevent cross-kind collisions.
  • Part F — component / library-call dispatch architecture.
  • Part G — SRC-5 discovery.

Non-normative exclusions: TOTP, SMS, passwords — documented as authentication methods that need a ZK envelope to become signers.

Reference implementation

haycarlitos/shhh-wallet-cairo at tag v8.4 (commit 3975532), the V8.4 ShhhAccount declared on Starknet mainnet 2026-05-15:

  • Verifier classes (Ed25519, secp256k1, WebAuthn P-256, STARK, and more) dispatched by the account via library_call_syscall.
  • Multi-owner storage, deterministic addresses, timelocked governance, guardian recovery, sessions-wallet migration.
  • All 12 audit findings from the 2026-04-20 review closed with tested regressions.
  • snforge: 259 passing, 0 failing.
  • 15 V8.x classes declared on mainnet (~327 STRK cumulative). Class hashes: docs/class-hashes.md.

Linked discussion

Note on file name and number

SNIPS/snip-x.md is already occupied by the pending Session Keys SNIP, so this draft is filed as SNIPS/snip-pluggable-signer.md with snip: X in the preamble, pending an editor-assigned number (generally the PR number per SNIP-1). Happy to rename to snip-NNN.md on assignment.

Authors

  • Carlos Castillo (@haycarlitos) — Chipi Pay, Shhh wallet
  • Omar Espejel (@omarespejel) — co-author, audit reviewer; co-author on the Session Keys SNIP this one stacks on

Status

Draft — open to community review. Not finalized until the reference implementation completes an independent external audit.

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