> ## Documentation Index
> Fetch the complete documentation index at: https://docs.gol.network/llms.txt
> Use this file to discover all available pages before exploring further.

# Install the SDK

> Add @gol/sdk to a TypeScript project, choose an entry point, and pin a version.

`@gol/sdk` is GOL's published TypeScript integration surface. It wraps the public API with typed clients and gives you the exact owner, agent, and EIP-7702 setup signing payloads and account operations each supported account checks. The GOL console currently calls documented public platform routes directly through its server-side gateway; developer applications use this SDK for owner signing and typed API access. The SDK depends only on public API and contract interfaces.

Two entry points keep secrets off the client. Import the one that matches where your code runs.

| Entry point | Import from | Use it in | Contains |
| - | - | - | - |
| Root | `@gol/sdk` | Browser, mobile bundle, or server | Policy encoding, owner and agent wallet payloads, EIP-7702 setup, child mandates, owner account operations, verification helpers |
| Server | `@gol/sdk/server` | Your server only | API clients that send your API key or developer session token, polling helpers, webhook verification |

The root entry point has no Node.js imports and no credentials, so it is safe in a web page. The server entry point holds your API key, so importing it into browser code would ship the key to every visitor.

## Add the package

Use Node.js 22 or later. `viem` is the SDK's only runtime dependency, and the versions below are pinned for the reason in the next section.

```sh theme={null}
pnpm add @gol/sdk@0.9.0 viem@2.54.6
```

```sh theme={null}
npm install @gol/sdk@0.9.0 viem@2.54.6
```

```sh theme={null}
yarn add @gol/sdk@0.9.0 viem@2.54.6
```

Pin `@gol/sdk` exactly. `latest` and `next` resolve to `0.9.0`; an unpinned range is not a reproducible build.

### Match the pinned viem

`@gol/sdk@0.9.0` declares `viem` as `2.54.6` exactly, not a range. Install that version so your project and the SDK share a single copy.

```sh theme={null}
pnpm add @gol/sdk@0.9.0 viem@2.54.6
```

This matters for types, not for the bytes on the wire. If your project resolves a different viem, the package manager installs a second nested copy. Both copies declare the same chain client types in separate modules, and TypeScript will not treat them as interchangeable, so a call such as `assertAccountImplementation(publicClient, ...)` fails to compile even though both objects look identical. Pinning, or adding a resolution rule that forces one version, resolves it.

## Which version to read

| | Value | What it covers |
| - | - | - |
| Published package | [`@gol/sdk@0.9.0`](https://www.npmjs.com/package/@gol/sdk/v/0.9.0) | Everything on this tab |
| Hosted Base Sepolia use | `@gol/sdk@0.9.0` | Compatible with the version 3 core and the five reviewed account configurations; the full five-family hosted gas acceptance was run with 0.5.0 |

`0.9.0` preserves the consolidated browser/server surface and binds hosted approval to the current Base Sepolia core. Existing owners remove the previous core, install the current one and approve new mandates. Service deployment and wallet acceptance are recorded separately in [availability](https://docs.gol.network/availability.md).

`0.7.1` types opt-in provisional inclusion webhooks and adds owner safety-action inclusion waits for API 0.7.0. Version `0.7.0` is deprecated because its npm archive omitted the compiled inclusion interfaces. `0.6.1` added workspace management, members, invitations, and onboarding methods to `GolManagementClient`. `0.6.0` added provisional inclusion fields and wait helpers for owner and agent transaction paths. `0.5.1` added project display-name updates and stable audit pagination to the developer management client without changing the hosted gas signing surface. `0.5.0` introduced hosted gas public API revision 2.0 for the version 3 core and changed owner signing: payloads use the version 3 core domain, the gas policy names the approved submitter, and `buildWalletSigningPayload` takes the GOL payload instead of a struct hash. It added the `nexus7702` family and EIP-7702 setup helpers, the agent's gas action signing with a charge ceiling, child mandates, developer relayer transactions, and their server routes. Approvals made with `0.4.0` or earlier bind the version 2 core and are not valid with the current version 3 setup. See [current availability](https://docs.gol.network/availability.md) for the supported network, addresses, and limits.

## Where to go next

> [card] [Browser entry point](https://docs.gol.network/sdk/browser.md)
>
> What `@gol/sdk` exports and how to wire an owner wallet to it.

> [card] [Server entry point](https://docs.gol.network/sdk/server.md)
>
> Typed clients, base URL rules, and how to keep credentials server-side.

> [card] [Owner signing](https://docs.gol.network/sdk/owner-signing.md)
>
> The two owner paths, the five account dialects, and verifying before signing.

> [card] [SDK reference](https://docs.gol.network/sdk/reference.md)
>
> Every exported symbol, generated from the package's own type declarations.

This section explains the SDK. [Integrate hosted gas](https://docs.gol.network/guides/hosted-gas.md) remains the single end-to-end walkthrough: one owner account from installation to revocation, with every step in order.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.