fix(sdk): reject TLS keys in wallet adapters - #1283
Merged
Merged
Conversation
kvinwang
force-pushed
the
fix/sdk-tls-key-scalar
branch
from
September 20, 2026 13:57
9a2a9b0 to
8131222
Compare
kvinwang
force-pushed
the
fix/sdk-tls-key-scalar
branch
from
September 22, 2026 01:33
8131222 to
87dfac0
Compare
kvinwang
force-pushed
the
fix/sdk-tls-key-scalar
branch
from
September 22, 2026 01:48
87dfac0 to
a7a191e
Compare
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.
Problem
The deprecated Python and JavaScript wallet adapters accepted
GetTlsKeyResponse. Their legacy conversion read the first 32 bytes of PKCS#8 DER as private-key material. Those bytes are fixed ASN.1 framing for P-256 keys, so different TLS keys produced the same Ethereum and Solana wallets.Affected adapters:
to_account,to_account_secure,to_keypair,to_keypair_securetoViemAccount,toViemAccountSecure,toKeypair,toKeypairSecureFix
Remove the TLS-key-to-wallet path instead of defining a new conversion for a deprecated API:
GetKeyResponseTypeErrorGetTlsKeyResponse.as_uint8array()/asUint8Array()remain unchangedApplications deriving wallets must use
get_key()/getKey().Security notice
Wallets previously produced by the non-secure TLS-key path use publicly derivable private-key material. Move any assets immediately. Upgrading prevents further derivation but cannot recover existing assets.
Verification
tsc --noEmitpassed