Is SUI Wallet plugin compatible with secp256k1 scheme?

Hi Friends!

If I use SUI CLI tool to create new wallet with scheme secp256k1 (instead of typical ed25519) I can’t seemingly correctly import it in SUI Wallet Plugin (neither in rival Suiet). If I propagate the 12-word phrase, in both plugins I get the same address, different from the one shown by the CLI tool itself.

Feel free to try this example:

# sui client new-address secp256k1
Created new keypair for address with scheme Secp256k1: [0x5b554d2a98ecb793a121587e501baf3867f7d1e8f19f217ba1c9d610dfdefce2]
Secret Recovery Phrase : [thrive camera damp milk emerge shy excess traffic canvas assault sting radar]

If I find and decode the private key from .sui/config/sui.keystore I got

0102379810d2a9518567ce67f65b752f644a27ec07c938f6a194eb18b4f982db8b73

which, after applying blake2b hash, yields exactly the address given by CLI tool (0x5b55…)

it is not possible to import such key into SUI Wallet app since it expects 32 bytes (here is additional 01 prefix - with ed25519 keys it is 00 hence may go unnoticed)

Can please anyone elaborate about current state of support for wallets using secp256k1 scheme? Or maybe I’m missing something or doing critically wrong?

9 Likes

UPD: got answer, supposedly from the core team dev member, that wallet plugin is not supposed to be fed with keys of different schemas rather than default ed25519.

6 Likes

Thanks for updating :slight_smile:

3 Likes

That’s right. A while ago I tried to do the same without success. With ed25519 it works nicely though. Would you specifically need secp256k1 for your use case?

3 Likes