Vity Toolkit
TelegramTwitterGithubRequest new tool
  • Introduction
    • Vity Toolkit
    • 🚀Quick Start - Langchain
    • 🚀Quick Start - Vercel AI
  • Features
    • Apps and Actions
    • How can I use Action directly?
    • Agent Authentication
    • Extensions
  • Tools
    • Superteam Earn
    • Solana Wallet
    • Reddit
    • Gibwork
    • Twitter
  • EXAMPLES
    • AI Bounty Finder
Powered by GitBook
On this page
  • Quick Start
  • Supported Actions
  1. Tools

Superteam Earn

Guide to use superteam earn tool on your AI agent using Vity Toolkit

PreviousExtensionsNextSolana Wallet

Last updated 5 months ago

Superteam Earn allows developers, designers, and everyone else to find earning opportunities in Web3. Complete an on-chain bounty and receive a Proof of Work NFT to start building your on-chain resume.

Quick Start

1

Install the package.

npm install vity-toolkit langchain @langchain/openai
2

Initialize Vity Toolkit and Langchain.

import { ChatOpenAI } from "@langchain/openai";
import { App, LangchainToolkit } from "vity-toolkit";
import { createOpenAIFunctionsAgent, AgentExecutor } from "langchain/agents";
import { ChatPromptTemplate } from "@langchain/core/prompts";

const llm = new ChatOpenAI({ model: "gpt-4o" });
const toolKit = new LangchainToolkit({
    userPrivateKey: "<private_key>",
});
3

Add the tool.

const tools = toolKit.getTools({ apps: [App.EARN] });
4

Define the Agent.

const prompt = ChatPromptTemplate.fromMessages([
  ["system", "You are a helpful assistant"],
  ["placeholder", "{chat_history}"],
  ["human", "{input}"],
  ["placeholder", "{agent_scratchpad}"],
]);

const agent = await createOpenAIFunctionsAgent({
    llm,
    tools,
    prompt,
});

const agentExecutor = new AgentExecutor({ agent, tools, verbose: true });
5

Execute the Agent.

const response = await agentExecutor.invoke({ input: "How much thatsmeadarsh has won till now?" });
console.log(response);

Supported Actions

Action
Description

Get list of activities feed of users in superteam earn, like if someone submitted a bounty or added a new project in this profile, and much more.

Fetches feed for a type (submission, pow, grant-application) and feed ID from Superteam Earn. It gives submission details with relative more submissions to the listing/bounty.

Fetches the grant details based on the provided slug.

Fetches grants associated with exclusive sponsor in Superteam Earn.

Fetches Proofs of Work (PoWs) for a specific user based on the provided user ID from Superteam Earn.

Fetches all the bounty listings based on various filters and criteria from the Superteam Earn homepage.

Fetches list of grants based on user region and other criteria from Superteam Earn.

Searches for user's details based on a query string, that can be a username, first name, or last name from the Superteam Earn homepage.

Fetches details of a specific submission based on the provided submission ID from the Superteam Earn homepage.

Fetches the total user count from the Superteam Earn.

Fetches public statistics for a user like participations, wins and totalWinnings (amount) he/she won, based on the provided username from the Superteam Earn.

Action.EARN_ACTIVITY_FEED
Action.EARN_FETCH_FEED
Action.EARN_FETCH_GRANT_DETAILS
Action.EARN_FETCH_EXCLUSIVE_SPONSOR_GRANTS
Action.EARN_FETCH_USER_POWS
Action.EARN_BOUNTY_LISTINGS
Action.EARN_GRANT_LISTINGS
Action.EARN_SEARCH_USERS
Action.EARN_SUBMISSION_DETAILS
Action.EARN_TOTAL_USER_COUNT
Action.EARN_FETCH_USER_PUBLIC_STATS