On-chain profiles for Solana wallets. Set an NFT as your wallet's avatar; any app can resolve it. Like Gravatar, but trustless and Solana-native.
A wallet's profile is a single PDA derived from [b"profile", wallet],
storing a pointer to the avatar mint. Resolution is deterministic — given a
wallet, anyone can find its profile address without an API or registry.
programs/portrait/— Solana program (Anchor 1.0). Two instructions:set_avatar(init-or-update the profile, set the avatar mint),clear_avatar(close the profile, refund rent).sdk/— TypeScript client (@sickart/portrait). Built on@solana/kit. ExposesgetProfile,resolveProfile,resolveProfiles, instruction builders, and PDA derivation. The resolver is SSRF-hardened — DNS pinning, scheme allowlist, response-size caps, redirect rejection.
# Build the program + run all tests (Rust + TS, against a local validator)
anchor test
# Just the SDK unit tests (no validator needed)
cd sdk && npm testRequires Anchor 1.0+, Solana CLI 3.x, surfpool 1.2+, Node 22+.
The program has been internally reviewed for the standard PDA-based account
attack vectors (impersonation, rent theft, reinit, signer bypass) and a
regression test suite locks each invariant. See
programs/portrait/tests/test_profile.rs.
The off-chain JSON resolver is hardened against SSRF, DNS rebinding, and
unsafe URL schemes returned from attacker-controlled NFT metadata. See
sdk/src/safe-fetch.ts.
MIT