Join Quest

Enroll Player in Quest.

Players join a Quest by "Acting On" your Quest Publication on Lens protocol through the Kinora Open Action Contract. This action ensures their interaction is recorded both within the Kinora Contract Suite, where each player maintains a unique profile linked to their Lens profile ID, and additionally within Lens networks and communities.

const polygonProvider = new ethers.providers.JsonRpcProvider(
    "https://polygonprovider.com",
    137,
  );

const {txHash, error, errorMessage } = await newDispatch.playerJoinQuest(
    "0x32-0x46",
    new ethers.Wallet(process.env.PLAYER_PRIVATE_KEY, polygonProvider));

Player Join Quest Props:

/* Enter the Lens pubId of the invoked Quest. */
pubId: `0x${string}`;

/* Wallet instance for the Player on Polygon Network. */
wallet: ethers.Wallet;

Result Object:

/* The txHash for acting on the Publication and joining the Quest. */
txHash?: `0x${string}`;

/* Boolean to indicate whether an error was encountered during joining. */
error: boolean;

/* Message of the encountered error. */
errorMessage?: string;

Last updated