Skip to content

Lean on SDK defaults and align env var naming - #1

Merged
amirylm merged 1 commit into
mainfrom
simplify-sdk-config
May 6, 2026
Merged

amirylm merged 1 commit into
mainfrom
simplify-sdk-config

Conversation

@signorecello

Copy link
Copy Markdown
Collaborator

Summary

  • Drops apiUrl / authDomain / audience from the SDK init — the SDK already defaults them to https://op.spacecomputer.io, auth.spacecomputer.io, and https://op.spacecomputer.io/api.
  • Drops description: "" and tags: [] from kms.createKey — the SDK omits both fields from the wire when undefined; passing empty values actively sent Description: "" / Tags: [].
  • Renames OP_CLIENT_ID / OP_CLIENT_SECRET → ORBITPORT_CLIENT_ID / ORBITPORT_CLIENT_SECRET to match the convention used in the SDK's own examples and tests (per the upcoming auth how-to in docs#15).
  • Removes the lazy-init proxy in src/lib/server/orbitport.ts: with undefined creds, the SDK constructor no longer throws, so build-time eager-validation protection is unnecessary.
  • Removes scripts/probe-sign.ts and the OP_BASE_URL / OP_AUTH_* / OP_DEBUG env knobs — debug helpers for the op-dev gateway, no longer needed now that we target prod exclusively.

Test plan

  • bun run build — typecheck + Next build pass
  • bun run dev and walk the four-step flow on Sepolia with real ORBITPORT_* credentials (create key → fund → deploy Counter → increment)
  • Confirm the env var rename is reflected in any deployment env (Vercel, etc.) before merging

The SDK already defaults apiUrl/authDomain/audience to prod and skips Description/Tags
on the wire when omitted, so the explicit values were redundant. Renames OP_CLIENT_ID/
OP_CLIENT_SECRET to ORBITPORT_CLIENT_ID/ORBITPORT_CLIENT_SECRET to match the SDK's own
examples and tests. Drops the lazy-init proxy: passing undefined credentials is now
constructor-safe, so the build no longer needs protection from eager validation. The
op-dev probe script goes away with the rest of the dev-gateway plumbing.
@amirylm
amirylm merged commit 7d84a4b into main May 6, 2026
3 of 4 checks passed
@amirylm
amirylm deleted the simplify-sdk-config branch May 6, 2026 09:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants