Skip to content

ECDSA api keys: create_api_key defaults to ECDSA, create_schnorr_api_key, change_api_key picks tx type, ApiKey.key_type - #200

Open
mihaimarcu2004 wants to merge 12 commits into
mainfrom
devin/1794422781-ecdsa-api-keys
Open

mihaimarcu2004 wants to merge 12 commits into
mainfrom
devin/1794422781-ecdsa-api-keys

Conversation

@mihaimarcu2004

@mihaimarcu2004 mihaimarcu2004 commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

Python side of elliottech/lighter-go#107.

  • create_api_key() now returns a secp256k1 ECDSA key (32-byte private key, 33-byte compressed public key). create_schnorr_api_key() returns the legacy 40-byte Schnorr key.
  • SignerClient.change_api_key / sign_change_api_key pick the tx type from the public key length: 33 bytes -> SignChangeECDSAPubKey (tx type 54), 40 bytes -> SignChangePubKey.
  • SignerClient accepts either private key; the signer picks the scheme from the key length.
  • ApiKey.key_type (0 Schnorr, 1 ECDSA) from /api/v1/apikeys.

The signer binaries in lighter/signers/ need to be rebuilt from lighter-go#107 (new exports GenerateSchnorrAPIKey, SignChangeECDSAPubKey) before this works at runtime.


🟢 Devin Review found nothing to fix · View findings

Devin Review

@devin-ai-integration

Copy link
Copy Markdown
Contributor

I'll fix CI failures and address comments from users with write access that start with 'Devin'.

  • Disable automatic comment, CI, and merge conflict monitoring

…eys; change_api_key picks tx type by pubkey length
@devin-ai-integration devin-ai-integration Bot changed the title ECDSA api keys: create_ecdsa_api_key, change_ecdsa_api_key (tx type 54), ApiKey.key_type ECDSA api keys: create_api_key defaults to ECDSA, create_schnorr_api_key, change_api_key picks tx type, ApiKey.key_type Nov 12, 2026
@mihaimarcu2004
mihaimarcu2004 marked this pull request as ready for review November 12, 2026 18:19

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Devin Review

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