Skip to content

ZeroDev Go SDK Documentation

Overview

The ZeroDev Go SDK works with the user operation builder API to help developers build and send User Operations (UserOps) on Ethereum and compatible networks using Go.

The user operation builder API is also accessible for self-hosting via Docker. Contact the ZeroDev team for more details.

The ZeroDev Go SDK enables developers to:

  • Build and send EIP-7702 User Operations (UserOps)
  • Sign EIP-7702 authorizations with private keys
  • Batch multiple blockchain calls in a single User Operation
  • Poll for User Operation receipts

Installation

Install the SDK using Go modules:

go get github.com/zerodevapp/sdk-go

Prerequisites

  • Obtain your Project ID and API Key from the ZeroDev Dashboard. You can use either the personal API key or the team API key associated with your project.
  • An active ZeroDev Project ID from the ZeroDev Dashboard.
  • A gas sponsorship policy configured for your ZeroDev project.

Quick Start

Refer to the complete example code on GitHub:

# Copy environment template
cp .env.example .env
 
# Edit .env and add your credentials
# Then run examples:
 
# EIP-7702 example
go run ./example -e 7702
 
# Show available commands
go run ./example help
 
# Edit the API URL in example/example.go to use the hosted API
baseURL := https://build-userop-api.zerodev.app