starkli icon indicating copy to clipboard operation
starkli copied to clipboard

Add support to import Metamask snap as signer with private key

Open 0xcoburn opened this issue 1 year ago • 4 comments

Wondering if we can add starkli support for a Metamask snap account, I can submit a PR, would it be any different than how you added support for Braavos and argent-X? Or should it be pretty straightforward?

0xcoburn avatar Jan 18 '24 05:01 0xcoburn

I have never used the Metamask snap account. Does it use an L1 private key for signing? So secp256k1?

xJonathanLEI avatar Jan 20 '24 23:01 xJonathanLEI

It's the familiar Metamask user interface just compatible with starknet. you can't switch between EVM compatible chains like you can with original Metamask though so it's strictly a Starknet wallet. I'm not sure which signature algorithm it uses but I'm guessing it'd be similar to what argent-X or Braavos are using

0xcoburn avatar Jan 25 '24 18:01 0xcoburn

Will have to look into their contracts to see what's there then.

xJonathanLEI avatar Jan 25 '24 18:01 xJonathanLEI

It uses the starkcurve so I think it wouldn't be much different than importing braavos or argent as a signer, but i don't know enough

https://github.com/Consensys/starknet-snap/blob/main/packages/starknet-snap/src/utils/starknetUtils.ts

0xcoburn avatar Jan 26 '24 23:01 0xcoburn