Skip to content

feat: p256 validator modes support#179

Merged
vr16x merged 3 commits intodevelopfrom
feat/p256-validator-modes-support
Feb 23, 2026
Merged

feat: p256 validator modes support#179
vr16x merged 3 commits intodevelopfrom
feat/p256-validator-modes-support

Conversation

@filmakarov
Copy link
Copy Markdown

  • add p256 simple mode
  • make execQuote support it
  • unify swicth/cases to use quote type, not a sig type

Copy link
Copy Markdown
Collaborator

@fichiokaku fichiokaku left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lg2m!

@filmakarov filmakarov requested a review from vr16x February 20, 2026 08:08
case MeeSignatureType.ERC20_PERMIT:
case MeeSignatureType.MM_DTK:
case MeeSignatureType.SAFE_SA:
switch (quoteType) {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Quote type is not provided by all the SDKs. Some old SDKs still don't send this and it might be a breaking change.

Let's revert back to the same approach

Copy link
Copy Markdown
Author

@filmakarov filmakarov Feb 23, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's this code block
Screenshot 2026-02-23 at 19 20 08

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It makes sure quote type is always defined.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can't see the screenshot

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So there's no need to revert to the same approach
This code is much cleaner. Previous approach was confusing => quote type and sig type were mixed together , while they mean pretty miuch same

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you reshare the pic, I see quoteType is optional in schema definition.

Sig type is good for backwards compatibility.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got it, all good. Yup I added this code block earlier for backwards compatibility.

I will merge this

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

quoteType is optional in schema definition.

it is optional. but in the code it is always defined!

if (!options.quoteType) {
      if (signatureType === MeeSignatureType.OFF_CHAIN) {
      if (
        signatureType === MeeSignatureType.OFF_CHAIN ||
        signatureType === MeeSignatureType.OFF_CHAIN_P256
      ) {
        quoteType = "simple";
      } else if (signatureType === MeeSignatureType.ON_CHAIN) {
        quoteType = "onchain";
      } else if (signatureType === MeeSignatureType.ERC20_PERMIT) {
        quoteType = "permit";
      } else if (signatureType === MeeSignatureType.MM_DTK) {
        quoteType = "mm-dtk";
      } else if (signatureType === MeeSignatureType.SAFE_SA) {
        quoteType = "safe-sa";
      } else {
        throw new BadRequestException(
          `Unsupported signature type for quote type detection ${signatureType}`,
        );
      }
    } else {
      quoteType = options.quoteType;
    }

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

However, initially its optional and its optional in quote phase.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

quote type is also better because two sig types (and more in future) can be still same quote type

Copy link
Copy Markdown
Collaborator

@vr16x vr16x left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please don't use quoteType. Its not a mandatory field because old versions of SDK don't send them

@vr16x vr16x self-requested a review February 23, 2026 16:26
Copy link
Copy Markdown
Collaborator

@vr16x vr16x left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LG2M

@vr16x vr16x merged commit ed7f2aa into develop Feb 23, 2026
9 of 10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants