Misc

searchTreesHatsWearers

Search for a Hat, Tree or Wearer by ID.

const res = await hatsSubgraphClient.searchTreesHatsWearers({
    chainId,
    search,
    treeProps,
    hatProps,
    wearerProps,
});

Arguments:

{
    chainId: number;
    search: string;
    treeProps: TreePropsConfig;
    hatProps: HatPropsConfig;
    wearerProps: WearerPropsConfig;
}
  • chainId - ID of the chain to fetch from.

  • search - ID to search for (Hat ID or pretty ID, Tree ID or Wearer address).

  • treeProps - Tree's properties to fetch, including the ones of nested objects. Check the TreePropsConfig type for the available properties and query filters.

  • hatProps - Hat's properties to fetch, including the ones of nested objects. Check the HatPropsConfig type for the available properties and query filters.

  • wearerProps - Wearer's properties to fetch, including the ones of nested objects. Check the WearerPropsConfig type for the available properties and query filters.

Response:

An object containing the search result.

Example:

Last updated