Add Secp256r1 to CurveType

Here we had a question when we implement the Rosetta API. Can we add the Secp256r1 Curve (which is Neo using) to the CurveType in the signature? Here is the original file:

:wave: @steven

In you docs, you mention that Neo uses a “special secp256r1-standard elliptic curve”. However, this looks to us like the “standard secp256r1 elliptic curve” (commonly referred to as P256 or NIST-P256). Is that correct?

Can we add the Secp256r1 Curve (which is Neo using) to the CurveType in the signature?

Congrats @steven :tada: This is the first CurveType/SignatureType request!! The process for adding support for a new CurveType or SignatureType is as follows:

  1. Create a PR in rosetta-specifications modifying the CurveType model. Make sure to clearly define the canonical format of this curve (in this case, it should just be a copy and paste of the secp256k1 format).
  1. Once the specification update is released, add the new CurveType or SignatureType to the asserter package. This package is used by many integrators to communicate with Rosetta implementations.

CurveType Assertion

SignatureType Assertion

  1. [Optional, but highly encouraged] Add support for the CurveType or SignatureType in the keys package. This package is used by the rosetta-cli to perform automatic Construction API testing.

We are actively working on ways to support more signing libraries (in different languages) during automated testing but have yet to formalize/release anything.

Hey Patrick,

Thanks for your detailed response!! Sure, We will do that.

Here’s an example of PR that adds a SignatureType (may help!):