Instantiate Envoker
Create the Envoker Instance.
Initiate the Envoker instance to create a new Quest. These functions eliminate the need for manual encoding of the correct Quest data for the Kinora Open Action, although these operations can also be performed outside the SDK if it aligns better with your Lens App architecture.
import { 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)
});Envoker Props:
Last updated