Skip to content

TC-1371 fix: canonicalize PKH DID addresses#71

Merged
skgbafa merged 1 commit into
mainfrom
fix/canonical-did-addresses
Jun 8, 2026
Merged

TC-1371 fix: canonicalize PKH DID addresses#71
skgbafa merged 1 commit into
mainfrom
fix/canonical-did-addresses

Conversation

@skgbafa

@skgbafa skgbafa commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

Context

TC-1371 surfaced a production no_delegation loop where delegation status and backend access checks could disagree. The public symptom was a user appearing signed in while API calls still returned No delegation found. One class of failure here is treating EVM addresses and PKH DIDs as raw strings: lowercase addresses, EIP-55 checksum addresses, and DID URLs with fragments can identify the same principal but fail equality checks.

Summary

  • Add tinycloud-auth identity helpers for canonical EIP-155 PKH DIDs.
  • Canonicalize PKH space/resource IDs and encryption network IDs.
  • Compare delegation, invocation, revocation, and delegation-list DIDs by canonical principal.
  • Keep unsupported DID methods exact, so only supported PKH/EIP-155 principals get address normalization.

Tests

  • cargo fmt
  • cargo test -p tinycloud-auth
  • cargo test -p tinycloud-core

Internal reference: TC-1371.

@skgbafa skgbafa merged commit f2ab974 into main Jun 8, 2026
14 checks passed
skgbafa added a commit to TinyCloudLabs/js-sdk that referenced this pull request Jun 8, 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.

1 participant