SDK Integration

Use Cases

  • Utilize addresses to gain access to rich profile information

  • Check for Civic Passes - Provides verification properties of addresses such as CAPTCHA, liveness, uniqueness, and ID verification.

Use the rich profile information to personalize your user's experience:

Loading the Profile Data

Import the SDK and load a profile as follows:

import { CivicProfile, Profile } from "@civic/profile";

// Query a user's profile using a wallet address, did or .sol domain
const profile: Profile = await CivicProfile.get(user);

The profile result will contain the following data:

// The resolved public key

// The resolved did

// A profile name, if available

// A profile image, if available

// A profile headline, if available

// access identifiers like connected social accounts
// [{ type: "github", value: "githubUsername" }]

Getting a list of Civic Passes for the user

Returns a list of Civic passes owned by the user. This will include passes owned by the user across all chains supported by Civic.

import { CivicProfile, GatewayToken } from "@civic/profile";

// Query using a wallet address, did or SNS name
const profile = await CivicProfile.get("query");

const passOptions: PassOptions = {
  includeExpired: true,

const passes: GatewayToken[] = await profile.getPasses(passOptions);

Last updated