Add stablecoin issuance API surface - #578
Conversation
Stablecoin issuance endpoints for the Grid API: provider account links, stablecoin registration, external accounts (Plaid link sessions, direct bank entry, Grid external accounts), mint/burn quotes and execution, and operations. Adds the stablecoin error codes to the Error400/404/409 enums and the Stablecoins tag. Spec source of truth for the webdev implementation stack starting at lightsparkdev/webdev#28029, which vendors this spec and generates the grid_api client from it. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
✱ Stainless preview builds for gridThis PR will update the cli csharp go kotlin openapi php python ruby typescript Edit this comment to update them. They will appear in their respective SDK's changelogs. ✅ grid-openapi studio · code · diff
✅ grid-ruby studio · code · diff
✅ grid-typescript studio · code · diff
✅ grid-go studio · code · diff
✅ grid-kotlin studio · code · diff
✅ grid-python studio · code · diff
✅ grid-csharp studio · code · diff
✅ grid-php studio · code · diff
✅ grid-cli studio · code · diff
This comment is auto-generated by GitHub Actions and is automatically kept up to date as you push. |
Adds the public API surface for direct stablecoin issuer operations that
shipped in the Grid server (webdev #29077 mint, #29078 burn): register a
provider-created stablecoin, list/get stablecoins, create direct mint and
burn operations, and list/get the resulting issuer operations.
- New paths: /stablecoins, /stablecoins/{id}, /stablecoins/{id}/mints,
/stablecoins/{id}/burns, /stablecoins/{id}/operations,
/stablecoin-operations/{id}.
- New schemas under components/schemas/stablecoins: Stablecoin,
StablecoinListResponse, StablecoinRegisterRequest, StablecoinMintRequest,
StablecoinBurnRequest, mint/burn source+destination, StablecoinOperation,
StablecoinOperation{Type,Status,Destination,ListResponse},
StablecoinFundingInstructions, StablecoinEstimatedDelivery,
StablecoinNetwork, Stablecoin{Grid,}OperationsStatus, StablecoinIssuanceStatus.
- Adds Error503 (SERVICE_UNAVAILABLE) used by the issuance responses.
StablecoinOperation.destination is a single merged StablecoinOperationDestination
object (superset of the mint/burn request destinations), NOT a oneOf: a
non-discriminated oneOf[Mint,Burn] is ambiguous (a burn destination validates
as both variants), so the generated SDK raises "Multiple matches found" on
every burn operation response. The merged object deserializes unambiguously.
This supersedes the quote-based issuance design in #578 (which is being
closed); the shipped server implements direct operations, not quotes.
Bundled with redocly; `redocly lint` passes.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
## What Adds the public API surface for **direct stablecoin issuer operations** that shipped in the Grid server (webdev #29077 mint, #29078 burn). Upstream `main` currently has only the stablecoin *provider-account* surface (from #594); the mint/burn/registration surface lives only in webdev's vendored `grid-api/openapi.yaml` and is absent here — so it gets clobbered on the next `update_schema.sh` regen and external SDK consumers never receive it. ## Surface added - **Paths:** `/stablecoins`, `/stablecoins/{stablecoinId}`, `/stablecoins/{stablecoinId}/mints`, `/burns`, `/operations`, `/stablecoin-operations/{stablecoinOperationId}`. - **Schemas** (`components/schemas/stablecoins/`): `Stablecoin`, `StablecoinListResponse`, `StablecoinRegisterRequest`, `StablecoinMintRequest`, `StablecoinBurnRequest`, mint/burn source + destination, `StablecoinOperation`, `StablecoinOperation{Type,Status,Destination,ListResponse}`, `StablecoinFundingInstructions`, `StablecoinEstimatedDelivery`, `StablecoinNetwork`, `Stablecoin{Grid,}OperationsStatus`, `StablecoinIssuanceStatus`. - Adds `Error503` (SERVICE_UNAVAILABLE) used by the issuance responses. ## Note on `StablecoinOperation.destination` It is a single merged `StablecoinOperationDestination` object (superset of the mint/burn request destinations), **not** a `oneOf`. A non-discriminated `oneOf[Mint,Burn]` is ambiguous — a burn destination validates as both variants — so the generated SDK raises "Multiple matches found" on every burn operation response. The merged object deserializes unambiguously. ## Supersedes #578 #578 modeled issuance as **quotes** (`/quotes` + `execute`); the shipped server implements **direct** mint/burn operations. This PR reflects what shipped. #578 is being closed. ## Validation Built with `npm run build:openapi` (redocly bundle) and `redocly lint` passes. Draft pending review; a follow-up regenerates webdev's vendored client from this once merged. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Important
Do not merge until the webdev implementation stack (lightsparkdev/webdev#28785 → #28734) has merged and the feature is ready to light up. Merging here publishes the endpoints: the nightly docs-sync workflow picks up
openapi/changes on main and the Stainless-documented spec feeds the public docs/SDKs. This PR stays draft until launch readiness.Summary
Companion spec PR for the Brale stablecoin issuance stack in webdev (implementation: the flow-sliced stack starting at lightsparkdev/webdev#28785). Adds to the split OpenAPI source (
openapi/):openapi/paths/stablecoins/: provider account links, stablecoin registration/list/get, external-account link sessions + linking (Plaid / direct bank entry / Grid external account), mint+burn quote create/get/execute, operations list/get.openapi/components/schemas/stablecoins/: typed discriminated requests (quote operation types, mint funding sources, link methods), typeddestinationoneOf on quote/operation, payout-rail subset enum, list envelopes.Error400/Error404/Error409enums (the generated clients hard-reject unknown codes, so these must ship before the backend returns them).Stablecoinstag.Bundle regenerated with
make build; Redocly validation clean; spectral passes at--fail-severity=error.Verification
The rebuilt bundle's stablecoin paths/schemas and error enums are deep-equal to the spec vendored in the webdev stack tip (verified programmatically). The only non-stablecoin delta vs that copy is
ExchangeRateFees.total, which exists here and not yet in webdev's vendored copy (pre-existing drift; webdev picks it up on its nextupdate_schema.shsync).🤖 Generated with Claude Code