orbis.getProfilesByUsername()

Returns an array of users matching with the username passed as a parameter.

How to use?

let { data, error } = await orbis.getProfilesByUsername(username);

Parameters

  • username: string Username we want to retrieve users for.

Returns

[
  {
  	did: "did:pkh:...",
  	details: {
      did: "did:pkh:...",
      profile: {
        username: "Baptiste",
    		description: "",
    		pfp: "https://..."
      }
  	},
  	count_followers: 132,
  	count_following: 31,
  	last_activity_timestamp: 1656580635
  },
  {
  	did: "did:pkh:...",
    details: {
      did: "did:pkh:...",
      profile: {
        username: "Charles",
    		description: "",
    		pfp: "https://..."
      }
  	},
  	count_followers: 125,
  	count_following: 64,
  	last_activity_timestamp: 1656580635
  },
  ...
]