> For the complete documentation index, see [llms.txt](https://fastlane-labs.gitbook.io/polygon-fastlane/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://fastlane-labs.gitbook.io/polygon-fastlane/searcher-guides/atlas-sdks.md).

# Atlas SDK's

Welcome to the Atlas SDK documentation. Our SDKs are designed to simplify the integration of Atlas Protocol into your applications, providing powerful tools for creating, managing, and executing operations within the Atlas ecosystem.

### Available SDKs[​](https://atlas-docs.pages.dev/atlas/sdks/overview#available-sdks) <a href="#available-sdks" id="available-sdks"></a>

Atlas offers two primary SDKs:

* [TypeScript SDK](https://www.npmjs.com/package/@fastlane-labs/atlas-sdk)
* [Golang SDK](https://github.com/FastLane-Labs/atlas-sdk-go)

Both SDK provide helper functionality for encoding solver Operation.\
For Typescript particular helpful is the `OperationsBuilder`

### Typescript

#### **Installation**

```bash
npm install @fastlane-labs/atlas-sdk
```

Or&#x20;

```bash
yarn add @fastlane-labs/atlas-sdk
```

#### Creating a SolverOperation

You can then simply create a OperationBuilder to create a solver Operation

<pre class="language-typescript"><code class="lang-typescript">
import { OperationBuilder, SolverOperation } from "@fastlane-labs/atlas-sdk";

<strong>const solverOp = OperationBuilder.newSolverOperation({
</strong>        from: solverSigner.address, // solver address
        to: atlasAddr, // atlasAddr address
        value: BigInt(0), // 0 value
        gas: BigInt(500000), // 500,000 gasLimit
        maxFeePerGas: maxFeePerGas,
        deadline: BigInt(0), // 0 deadline
        solver: solverSigner.address, // dAppOpSigner address
        control: dappControlAddr, // dappControl address
        userOpHash: userOpHash, 
        bidToken: "0x0000000000000000000000000000000000000000", // POL
        bidAmount: bidAmount,
        data: solverCallData,
        signature: "0x" // empty signature
    });
 

// Generate the solver signature
const solverSignature = await generateSolverSignature(solverOp);

// Set the solver signature
solverOp.setField("signature", solverSignature);
 
</code></pre>

#### Encoding SolverOperation <a href="#choosing-the-right-sdk" id="choosing-the-right-sdk"></a>

SolverOperation class provides a helper function toStruct() which takes care of serialising and hex encode the SolverOperation.&#x20;

```typescript
//to Submit the data we need to JSON.stringify the struct
const generatePflBundle = (solverOp: SolverOperation, opportunityRawTx: string, bundleId: number): PflBundle => {
    return {
        id: bundleId,
        jsonrpc: "2.0",
        method: "pfl_addSearcherBundle",
        params: [`${opportunityRawTx}`, `${JSON.stringify(solverOp.toStruct())}`]
    }
}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://fastlane-labs.gitbook.io/polygon-fastlane/searcher-guides/atlas-sdks.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
