Skip to content

[WALLET-202] Add US nationality scope - #46

Merged
matt-russo-notarize merged 4 commits into
proof:mainfrom
matt-russo-notarize:mattrusso/WALLET-202/us-national
Sep 2, 2026
Merged

matt-russo-notarize merged 4 commits into
proof:mainfrom
matt-russo-notarize:mattrusso/WALLET-202/us-national

Conversation

@matt-russo-notarize

Copy link
Copy Markdown
Collaborator

Adds the new US nationality scope.

  • Updates CredentialID and Scope into default | nationality
  • Adds national credential id to CREDENTIAL_IDS
  • Updates verifyVPToken to initialize all credential ids to [] to match the VPToken's shape
  • Adds tests to confirm scope is accepted and verifier behavior change is working

frostevent
frostevent previously approved these changes Sep 1, 2026

@frostevent frostevent left a comment

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.

@matt-russo-notarize do we need a new subclass of ProofCredential in https://github.com/proof/proof-vc-common/blob/main/packages/server/src/proof_credentials.ts? If CI is passing, can we make sure we add a test that would break if you have need credential types without their class counterpart?

@matt-russo-notarize

Copy link
Copy Markdown
Collaborator Author

@frostevent I don't think we need a new subclass since it is still a ProofCredentialV1, I just needed to add is_national/us to ProofCredentialV1 and to the factory.

Also i added exhaustiveness checks for credential types<->classes and ids to confirm the unions are adhered to.

DEFAULT_CREDENTIAL_ID,
NATIONALITY_US_CREDENTIAL_ID,
];
const CREDENTIAL_ID_SET = {

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.

Why do we need CREDENTIAL_ID_SET?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

it's so we check satisfies on compile to ensure no new CredentialType member is added without a matching class name.

added a comment about it and removed the export

@matt-russo-notarize
matt-russo-notarize enabled auto-merge (squash) September 2, 2026 10:26
@matt-russo-notarize
matt-russo-notarize merged commit 24a135f into proof:main Sep 2, 2026
7 checks passed
@matt-russo-notarize matt-russo-notarize mentioned this pull request Sep 2, 2026
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.

2 participants