xJonathanLEI / starkli

Starkli (/ˈstɑːrklaɪ/), a ⚡ blazing ⚡ fast ⚡ CLI tool for Starknet powered by 🦀 starknet-rs 🦀
https://book.starkli.rs
Apache License 2.0
156 stars 44 forks source link

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

Open barretodavid opened 1 year ago

barretodavid commented 1 year ago

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.

xJonathanLEI commented 1 year ago

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 commented 12 months ago

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