Quickstart
The Quickest Route to Getting Started.
Install the SDK
# Install via NPM
npm i kinora-sdk# Install via yarn
yarn add kinora-sdkimport { Envoker } from "kinora-sdk";
const apolloClient = new ApolloClient({
link: new HttpLink({ uri: 'https://api.lens.xyz/graphql' }),
headers: {
"x-access-token": `Bearer ${authToken}`,
},
cache: new InMemoryCache(),
});
const lensProvider = new ethers.providers.JsonRpcProvider(
"https://lensprovider.com",
232,
);
const newEnvoker = new Envoker({
authedApolloClient: client,
ipfsConfig: {
uploadEndpoint: "https://api.pinata.cloud/pinning/pinJSONToIPFS",
gateway: "https://gateway.pinata.cloud",
headers: {
Authorization: "Bearer YOUR_PINATA_JWT"
}
},
envokerLensAddress: "0xlensprofileaddress",
wallet: new ethers.Wallet(process.env.ENVOKER_PRIVATE_KEY, lensProvider)
});
const { postId, factoryId, questId, transactionHash, factoryQuestData } = await newEnvoker.instantiateNewQuest({
factoryId: 0,
questDetails: {
title: "Chromadin Chronicle",
description: "Engage in a Chromadin video binge session for Season 1 and Season 2 of The Dial Pirate Radio . Interactions, mirrors and comments on episodes accrue bonus points.",
cover: "ipfs://QmQk9TqFivUqc6ktosoZVVih9o1uiY3r5Z7F3GCC1FpaJS",
},
maxPlayerCount: 100,
milestones,
joinQuestTokenGatedLogic: tokenGatedLogic,
});Last updated