LaunaDocs
SDKS

Go

Core automation + buyer for CI/CD

Go client for the Launa control plane and buyer helpers. Module: github.com/AxLabs/launa-sdks/go (source in packages/golang/).

The Go import path follows the GitHub repo (AxLabs/launa-sdks), not the npm scope (@launa).

Install

go get github.com/AxLabs/launa-sdks/go

Buyer

Pay gateway URLs with EVM exact and batch-settlement. See Buyer clients.

import "github.com/AxLabs/launa-sdks/go/buyer"

c, err := buyer.NewFromPrivateKey(os.Getenv("LAUNA_EVM_PRIVATE_KEY"))
resp, err := c.Get(ctx, "https://my-api.launa.io/v1/foo")
defer resp.Body.Close()
settle, _ := c.SettleResponseFrom(resp)

Batch endpoints: pass buyer.BatchOptions{DepositMultiplier: 5} to buyer.New / NewFromPrivateKey.

Also: PayURL(ctx, method, url, body), Do(ctx, req), HTTPClient().

Protocol: github.com/x402-foundation/x402/go.

Control plane

import launa "github.com/AxLabs/launa-sdks/go"

client := launa.NewClient(baseURL, launa.Credentials{
    APIKey: os.Getenv("LAUNA_API_KEY"),
})
apis, err := client.ListAPIs(ctx)
api, err := client.CreateAPI(ctx, launa.CreateAPIInput{
    Name: "My API", Slug: "myapi", UpstreamBaseURL: "https://api.example.com",
    DiscoveryGuidance: "Use GET /v1/*.",
    DiscoveryContactEmail: "support@example.com",
})
disc, err := client.GetAPIDiscovery(ctx, api.ID)

Flat methods: auth, keys, APIs (GetAPIDiscovery), endpoints (schema fields on create/update), domains, OpenAPI import, stats, settlements, billing, income, exchange rates, and config. Includes CheckSlugAvailability and ProbeUpstream.

JWT-only routes (MFA, passkeys) are TypeScript-only today. Discovery guide: API discovery.

Package helpers

  • launa.GatewayURL — build gateway URLs
    • launa.BuildUsdcAccept — USDC accept options
    • launa.ScopePresets — API key scope presets
    • launa.SetupAPIWithDefaultDomain, launa.WrapOpenAPI

On this page