starkli icon indicating copy to clipboard operation
starkli copied to clipboard

Feature Request: Add support for `secp256r1` and `secp256k1`

Open barretodavid opened this issue 1 year ago • 2 comments

The structure of the file account.json that describes an account contract only supports one type, open_zeppelin that relies on a single signer using the stark friendly elliptic curve found in the cairo package ecdsa.

{
  "version": 1,
  "variant": {
    "type": "open_zeppelin",
    "version": 1,
    "public_key": "<SMART_WALLET_PUBLIC_KEY>"
  },
  "deployment": {
    "status": "deployed",
    "class_hash": "<SMART_WALLET_CLASS_HASH>",
    "address": "<SMART_WALLET_ADDRESS>"
  }
}

It would be very useful to also include support for single signer using secp256k1 (Ethereum's ECC) and secp256r1 (Standard ECC). Both ECCs are already available inside the cairo repo under starknet.

barretodavid avatar Jul 13 '23 20:07 barretodavid

I think there might be a confusion regarding how accounts are handled. starkli does not directly support any specific key types. Instead, it supports whatever keys expected by the support account flavors. Right now, the only support flavor is OpenZeppelin. Additional key types will be supported once we add more "flavors" that make use of them.

xJonathanLEI avatar Jul 14 '23 02:07 xJonathanLEI

@barretodavid May I know which specific account contract implementations make use of these curves?

xJonathanLEI avatar Jul 20 '23 08:07 xJonathanLEI