signMessage for authenticating users can choose to opt-in to one of the various Sign-In with (SIW) standards. If a message follows one of the supported standards, Phantom will verify required fields at the time of signing.
At the time of this writing, Phantom supports:
- Sign-In with Solana (specification)
- Sign-In with Ethereum (EIP-4361)
- Sign-In with X (CAIP-122)
Sign-In with Solana
See our specification and integration guide on GitHub.Sign-In with Ethereum
The Sign-In with Ethereum standard is defined by EIP-4361.Examples
signMessage()Sign-In with X
The Sign-In with X standard is defined by CAIP-122. It uses CAIP-10 identifiers for theaddress field and CAIP-2 for chain-id.
While CAIP-122 is technically chain-agnostic, only Ethereum and Solana parsing are supported at this time.
Ethereum example
signMessage()Solana example
signMessage()Phantom uses Ed25519 signatures for Solana message signatures. To verify a message signature, you can use the tweetnacl npm package.