Repository navigation
ECDSA api keys: create_api_key defaults to ECDSA, create_schnorr_api_key, change_api_key picks tx type, ApiKey.key_type - #200
Draft
mihaimarcu2004 wants to merge 4 commits into
Draft
mihaimarcu2004 wants to merge 4 commits into
mihaimarcu2004 wants to merge 4 commits into
Conversation
…4), ApiKey.key_type
Contributor
|
I'll fix CI failures and address comments from users with write access that start with 'Devin'.
|
…eys; change_api_key picks tx type by pubkey length
…ff35667 (GenerateSchnorrAPIKey, SignChangeECDSAPubKey)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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_keypick the tx type from the public key length: 33 bytes ->SignChangeECDSAPubKey(tx type 54), 40 bytes ->SignChangePubKey.SignerClientaccepts 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 exportsGenerateSchnorrAPIKey,SignChangeECDSAPubKey) before this works at runtime.