Explanation
Sunbreak requires an identity token, not just an access token. Privy’suseIdentityToken() hook provides a signed JWT that cryptographically binds the user’s wallet address to their authenticated identity.
This ensures that the wallet being sent to Sunbreak is verifiably the same one that authenticated through Privy — preventing mismatched or spoofed wallet sessions.
The getIdentity function simply returns the current identity token whenever Sunbreak requests it, allowing the SDK to validate wallet ownership securely.