Skip to content

feat: add wallet_sign and wallet_getEdDsaPublicKey RPC methods#121

Draft
aryzing wants to merge 3 commits into
mainfrom
feat/eddsa-signing
Draft

feat: add wallet_sign and wallet_getEdDsaPublicKey RPC methods#121
aryzing wants to merge 3 commits into
mainfrom
feat/eddsa-signing

Conversation

@aryzing

@aryzing aryzing commented Mar 15, 2026

Copy link
Copy Markdown
Contributor

Weekend AI project

This was part of a weekend project to practice having an AI agent implement a feature across several repos from a single Linear prompt. It worked, but I don't think anyone has time to review this feature. We can reopen if it valuable or ultimately close all related PRS.


Summary

Adds two new RPC method definitions to the wallet namespace for EdDSA signing capabilities.

New Methods

wallet_sign

  • Request params: Discriminated union on algorithm field (currently supports EdDSA)
    • algorithm: 'EdDSA' — EdDSA signing
    • payload: string — Hex-encoded payload to sign
  • Response: { signature: string, publicKey: string } — Both hex-encoded

wallet_getEdDsaPublicKey

  • Request params: Empty object {}
  • Response: { publicKey: string } — Hex-encoded 32-byte Ed25519 public key

Changes

  • Registered method names in methods.ts
  • Created method directories with request/response schemas using valibot
  • Wired into wallet namespace type maps (WalletRequests, WalletSuccessResponses)
  • Added schemas to wallet request/response variant discriminators

- Add wallet_sign method with discriminated union on algorithm (EdDSA)
- Add wallet_getEdDsaPublicKey method for retrieving Ed25519 public key
- Define valibot schemas for request/response validation
- Wire new methods into wallet namespace exports and type maps
@aryzing aryzing self-assigned this Mar 15, 2026
@aryzing aryzing marked this pull request as ready for review March 15, 2026 21:31
aryzing added 2 commits March 15, 2026 23:45
- Rename edDsaSignParamsSchema -> ed25519SignParamsSchema with 'Ed25519' literal
- Add ed25519phSignParamsSchema with 'Ed25519ph' literal
- Update walletSignParamsSchema discriminated union to include both
@aryzing aryzing marked this pull request as draft March 19, 2026 06:11
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