Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate Identity #1621

Merged
merged 169 commits into from
Mar 6, 2025
Merged

Migrate Identity #1621

merged 169 commits into from
Mar 6, 2025

Conversation

codabrink
Copy link
Contributor

@codabrink codabrink commented Feb 11, 2025

Proto: xmtp/proto#245

Migrate Identity

In our old identity system in libxmtp, String was assumed to be an ethereum address and Vec<u8> was assumed to be an installation key. This posed a few issues - for example sanitizing addresses was difficult since there was no "entry point" for addresses as they were just strings, it limited extensibility to other chains, and prevented us from implementing behaviors nicely on certain identities.

To fix this, each identity type is now wrapped in a struct. Before, a simple String that represented an ethereum address is now Ethereum(String), but you'll rarely find yourself dealing with the Ethereum struct directly. Instead - there is one new enum along-side the previously existing enum MemberIdentifier: PublicIdentifier

  • MemberIdentifier (libXmtp only)
    • Represents all identifiers
      • InstallationKey
      • Ethereum
      • Passkey
      • Solana
  • Identifier (libXmtp and FFI)
    • All identifiers except for the installation keys
      • Ethereum
      • Passkey
      • Solana
flowchart TD
    subgraph MemberIdentifier["MemberIdentifier"]
        Installation
        subgraph Identifier["Identifier"]
            Ethereum
            Passkeys
            Solana
            Sui
        end
    end
    
    classDef identifierStyle fill:#f6ffed,stroke:#52c41a
    classDef memberStyle fill:#fff7e6,stroke:#fa8c16
    
    class Identifier identifierStyle
    class MemberIdentifier memberStyle
Loading

This PR does not include P256 signature validation and only focuses on the identity migration. That is coming in a fast follow.

@codabrink codabrink changed the title Add Passkeys Add Passkeys (Read) Feb 11, 2025
@codabrink codabrink enabled auto-merge (squash) March 6, 2025 17:07
@codabrink codabrink merged commit c2b9906 into main Mar 6, 2025
18 checks passed
@codabrink codabrink deleted the coda/passkeys branch March 6, 2025 17: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.

5 participants