The Chainnet SDK for Go
  • Go 96.3%
  • Makefile 3.7%
Find a file
2026-05-06 23:07:44 +02:00
.github/workflows Fix release tag resolution (#7) 2026-05-03 18:42:33 +02:00
v1beta Update Go SDK from chainnet remove-local-SDK-dependency (#6) 2026-05-03 18:22:49 +02:00
.gitignore Skip goreleaser builds due to this being a lib (#5) 2026-05-03 17:23:09 +02:00
.goreleaser.yml Skip goreleaser builds due to this being a lib (#5) 2026-05-03 17:23:09 +02:00
go.mod Bootstrap code setup 2026-05-02 15:17:21 +02:00
go.sum Bootstrap code setup 2026-05-02 15:17:21 +02:00
Makefile Introduce automation for SDK release (#4) 2026-05-03 17:06:38 +02:00
mise.toml Introduce automation for SDK release (#4) 2026-05-03 17:06:38 +02:00
README.md Introduce automation for SDK release (#4) 2026-05-03 17:06:38 +02:00
renovate.json Renovate modify 2026-05-06 23:07:44 +02:00

Chainnet SDK Go

Releases

chainnet-sdk-go versioning is independent from chainnet. Tag SDK releases based on the Go client impact, not the server version, and push tags matching v* to trigger GitHub Releases automatically.

Version upgrades follow SDK semver from the Go consumer point of view: patch for non-breaking fixes, minor for backward-compatible additions, and major for breaking public API changes. While the SDK remains in v0.x, release notes should still call out breaking changes explicitly.

Usage

package main

import (
	"context"
	"fmt"
	"log"

	"github.com/yago-123/chainnet-sdk-go/v1beta"
)

func main() {
	client, err := v1beta.NewClient("http://localhost:8080", nil)
	if err != nil {
		log.Fatal(err)
	}

	tip, err := client.GetLatestChain(context.Background())
	if err != nil {
		log.Fatal(err)
	}

	fmt.Printf("latest height: %d\n", tip.Height)
}

The client normalizes the base URL and targets /api/v1beta automatically.