KinoraSDK
  • Overview
  • Quickstart
  • Contracts
  • Subgraphs
  • Open Source Code
  • SDK Reference
    • Envoker
      • Instantiate Envoker
      • Instantiate New Quest
      • Terminate & Withdraw
      • Delete Quest
      • Verify Player Milestone
    • Dispatch
      • Instantiate Dispatch
      • Join Quest
      • Milestone Eligibility Check
      • Complete Milestone
    • Kinora Player Wrapper
      • Kinora Provider
      • Kinora Player Wrapper
      • Send Metrics On-Chain
    • Helpers
  • Live
    • Quest No Code
    • Cypher Search
    • Chromadin
  • Architecture
    • Data Corruption Mitigation
  • Resources
    • Issues
    • Testing
    • Contributors
    • About the Devs
    • Storefront
  • Github
  • Livepeer Developer Docs
Powered by GitBook
On this page
  1. SDK Reference
  2. Dispatch

Instantiate Dispatch

Create the Dispatch Instance.

Initiate the Dispatch instance to invoke the Player Join Quest and Complete Milestone functions. These functions eliminate the need for manual encoding of the correct Quest data for the KinoraOpenAction, and for accurately acting on the Lens publication, although these operations can also be performed outside the SDK if it aligns better with your Lens App architecture.

import { Dispatch } from "kinora-sdk";

const apolloClient = new ApolloClient({
  link: new HttpLink({ uri: 'https://api-v2.lens.dev/' }),
  headers: {
    "x-access-token": `Bearer ${authToken}`,
  },
  cache: new InMemoryCache(),
});


const newDispatch = new Dispatch({
    playerAuthedApolloClient: client
});

Dispatch Props:

/* Lens authenticated Apollo Client. This can be the same client used for other Lens interactions within your App that the player is Authed for. It is used for enabling the Player to interact with the Quest publication Open Action.*/
playerAuthedApolloClient: ApolloClient<NormalizedCacheObject>;
PreviousDispatchNextJoin Quest

Last updated 1 year ago