Mirrors keysat 0014 + the v0.3.0 cuts of the other three SDKs. New
EntitlementDef type with Slug + Name + Description; PublicPoliciesProduct
gains EntitlementsCatalog []EntitlementDef. SDK consumers' in-app
tier pickers can render display names + tooltip descriptions instead
of raw slugs. Empty slice on legacy products without a catalog.
No breaking change.
The Go SDK's online client previously only exposed Validate +
PublicKey. This adds the purchase-side surface so Go consumers
have the same capabilities as the other three language clients:
- StartPurchaseOptions struct (BuyerEmail, BuyerNote, RedirectURL,
Code, PolicySlug). Zero-valued fields are omitted from the
JSON request body.
- Client.StartPurchase(ctx, productSlug, opts) → PurchaseSession
with InvoiceID, BTCPayInvoiceID, CheckoutURL, AmountSats,
PollURL.
- Client.ListPublicPolicies(ctx, productSlug) →
PublicPoliciesResponse for rendering an in-app tier picker.
Public endpoint, no auth.
session, err := client.StartPurchase(ctx, "recap",
keysat.StartPurchaseOptions{
PolicySlug: "pro",
BuyerEmail: "buyer@example.com",
RedirectURL: "https://recap.app/thank-you",
})
// open session.CheckoutURL in the buyer's browser
tiers, err := client.ListPublicPolicies(ctx, "recap")
for _, p := range tiers.Policies {
fmt.Println(p.Slug, p.Name, p.PriceSats, p.Entitlements)
}
Build + existing crosscheck tests pass clean.
Pure-Go, stdlib-only implementation of the LIC1 wire format:
- ParseKey + Verify + ParseAndVerify for offline verification
- HashFingerprint helper (SHA-256, matching the daemon's contract)
- LoadPublicKeyPEM for the standard PKIX-encoded Ed25519 public keys
the daemon emits
- Client.Validate / Client.PublicKey for online checks against a
running Keysat daemon
- LicensePayload struct with idiomatic Go getters (IsTrial,
IsFingerprintBound, IsExpiredAt, HasEntitlement)
Wire-format crosscheck against the shared tests/crosscheck/vector.json
(the same file the Rust, TypeScript, Python SDKs and the daemon itself
test against). All four fixtures pass — v1 legacy fingerprint-bound,
v2 trial with entitlements, v2 perpetual unbound, plus end-to-end
PEM-load → ParseAndVerify signature roundtrip. Confirms byte-for-byte
agreement across five independent implementations.
No third-party dependencies. Module path:
github.com/keysat-xyz/keysat-client-go
go 1.21