Skip to content

Conversation

@AntonioCeppellini
Copy link
Contributor

Description:

This PR refactor TokenInfo to make it immutable (frozen=True), removes al setter methods and replaces them with constructor initialization, and rewrites _from_proto.

  • Convert TokenInfo to an immutable @dataclass(frozen=True)
  • Removes all setters methods
  • Rewrite _from_proto
  • Add _public_key_from_oneof helper to replace the previous _copy_key_if_present
  • Update all unit tests to test immutability

Related issue(s):

Fixes #800

Checklist

  • Documented (Code comments, README, etc.)
  • Tested (unit tests updated and expanded)

…factory

Signed-off-by: Antonio Ceppellini <antonio.ceppellini@gmail.com>
Signed-off-by: Antonio Ceppellini <antonio.ceppellini@gmail.com>
@github-actions
Copy link

Hi, this is WorkflowBot.
Your pull request cannot be merged as it is not passing all our workflow checks.
Please click on each check to review the logs and resolve issues so all checks pass.
To help you:

@AntonioCeppellini AntonioCeppellini changed the title 800 token info as readonly refactor: TokenInfo readonly (800) Nov 28, 2025
@AntonioCeppellini AntonioCeppellini marked this pull request as draft November 28, 2025 11:06
…factory

Signed-off-by: Antonio Ceppellini <antonio.ceppellini@gmail.com>
@AntonioCeppellini AntonioCeppellini marked this pull request as ready for review November 28, 2025 11:09
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.

TokenInfo and its setters

1 participant