@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. It is the same package the GOL console uses, and it depends only on the public API and contract interfaces.
Two entry points keep secrets off the client. Import the one that matches where your code runs.
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.
@gol/sdk exactly. The package publishes under both the latest and next tags, and today both resolve to 0.5.0, so an unpinned range is not a reproducible build.
Match the pinned viem
@gol/sdk@0.5.0 declares viem as 2.37.13 exactly, not a range. Install that version so your project and the SDK share a single copy.
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
0.5.0 implements hosted gas public API revision 2.0 for the version 3 core. It is a breaking release for 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 adds 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 for the supported network, addresses, and limits.
Where to go next
Browser entry point
What
@gol/sdk exports and how to wire an owner wallet to it.Server entry point
Typed clients, base URL rules, and how to keep credentials server-side.
Owner signing
The two owner paths, the five account dialects, and verifying before signing.
SDK reference
Every exported symbol, generated from the package’s own type declarations.