Skip to content
Versionv0.1 ALPHA 2

Go SDK

Coming soon

The Go SDK is in development and not yet published. Today the Rust SDK and the WebAssembly verifier are available; the JS, Python, and Go bindings are on the roadmap. The examples below preview the planned API.

The Go SDK is designed for backend services and gateways. It links the verification core statically with no CGO requirement for the default build.

Install

bash
go get github.com/osdf-systems/osdf-go

Verify a package

bash
package main import (    "fmt"    "log"     "github.com/osdf-systems/osdf-go") func main() {    trust, err := osdf.LoadTrustStore("./trust")    if err != nil {        log.Fatal(err)    }     report, err := osdf.VerifyFile("contract.osdf", trust)    if err != nil {        log.Fatal(err)    }     fmt.Printf("trust score: %d\n", report.Score)    if !report.OK {        log.Fatal("verification failed")    }}

Gateway integration

The package exposes an http.Handler middleware that verifies inbound OSDF attachments and quarantines anything that fails closed.

Spec status: working draft v0.4 · subject to change before v1.0.