# Instantiate Envoker

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.

{% code overflow="wrap" fullWidth="true" %}

```typescript
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)
});
```

{% endcode %}

**Envoker Props:**

{% code overflow="wrap" fullWidth="true" %}

```typescript
/* Lens authenticated Apollo Client. This can be the same client used for other Lens interactions within your App. It is used for publishing the Quest to your Lens feed through the SDK.*/
authedApolloClient: ApolloClient<NormalizedCacheObject>;

/* IPFS Config. The upload endpoint, gateway and required auth headers for your IPFS client i.e. Infura, Pinata etc.*/
ipfsConfig: {
  uploadEndpoint: string;
  gateway: string;
  headers?: Record<string, string>;
};

/* (Optional) Wallet instance for Polygon Network. You can also pass the wallet instance later when calling individual functions. */
wallet?: ethers.Wallet;

/* (Optional) Lens Profile Address of the envoker. You can also pass the profile address later when calling individual functions. */
envokerLensAddress: `0x${string}`;

/* (Optional) Existing Kinora Escrow Contract from a previously  Factory instantiation. */
kinoraEscrowContract?: `0x${string}`;

/* (Optional) Existing Kinora Metrics Contract from a previously  Factory instantiation. */
kinoraMetricsContract?: `0x${string}`;
```

{% endcode %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://codex.irrevocable.dev/sdk-reference/envoker/instantiate-envoker.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
