Skip to content

#122 Add network id to unicity id mint transaction#123

Merged
b3y0urs3lf merged 3 commits into
mainfrom
issue-122
Jun 13, 2026
Merged

#122 Add network id to unicity id mint transaction#123
b3y0urs3lf merged 3 commits into
mainfrom
issue-122

Conversation

@martti007

Copy link
Copy Markdown
Collaborator

No description provided.

@martti007 martti007 linked an issue Jun 6, 2026 that may be closed by this pull request

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Code Review

This pull request integrates networkId into UnicityIdMintTransaction and its certified variant, updating CBOR serialization, verification rules, and test suites. It also introduces private _brand properties to several transaction classes and refactors TypeScript configurations. The review feedback correctly identifies a backward-compatibility issue: adding networkId to the CBOR array changes its length from 6 to 7 without incrementing the transaction version, which will break deserialization of existing version 1 transactions. It is recommended to either bump the version or support both array lengths.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread src/unicity-id/UnicityIdMintTransaction.ts
Comment thread tsconfig.json
@MastaP

MastaP commented Jun 10, 2026

Copy link
Copy Markdown
Member

Missing test for the new network-mismatch failure path

MintNetworkMatchesTrustBaseRule (in CertifiedUnicityIdMintTransactionVerificationRule) adds a FAIL branch, but the only test touched (tests/utils/TransitionFlow.ts) exercises the happy path with a matching trustBase.networkId. The VerificationStatus.FAIL branch is currently untested.

Given the project's emphasis on verification-rule coverage (cf. #115), please add a test that mints/verifies a unicity-id genesis with a mismatched networkId and asserts:

  • the result is VerificationStatus.FAIL
  • the message is Mint network does not match trust base.

Otherwise a regression in this check would go unnoticed.

@b3y0urs3lf b3y0urs3lf merged commit 35220b6 into main Jun 13, 2026
1 check passed
@b3y0urs3lf b3y0urs3lf deleted the issue-122 branch June 13, 2026 18:48
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.

Unicity ID mint transaction is missing network id

3 participants