docs(CPL-279): document ChainSecured HTTP endpoints, drop orphan api_direct#321
Merged
docs(CPL-279): document ChainSecured HTTP endpoints, drop orphan api_direct#321
Conversation
…direct Adds reference entries for `POST /create_wallet_with_signature` and `POST /convert_to_chain_secured_account` in docs/management/api_direct.mdx — the two HTTP endpoints backing ChainSecured mode that had no formal documentation. Both include request/response shapes and curl examples. Cross-links to the new account_modes.mdx for the SDK-side workflow so the same content isn't documented twice. Deletes the orphaned docs/api_direct.mdx (not in docs.json nav, no inbound links, drifted from the management/ canonical version). Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Docs cleanup and coverage expansion for ChainSecured (sovereign) flows by documenting previously-undocumented HTTP endpoints and removing an orphaned duplicate doc page.
Changes:
- Add reference docs for
POST /create_wallet_with_signatureandPOST /convert_to_chain_secured_accounttodocs/management/api_direct.mdx. - Cross-link to
/management/account_modesfor the full ChainSecured SDK workflow (avoid duplicating sovereign-mode SDK docs). - Delete the unreferenced/orphaned
docs/api_direct.mdxpage.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| docs/management/api_direct.mdx | Adds documentation for the two ChainSecured-mode HTTP endpoints and links to account mode docs for the broader flow. |
| docs/api_direct.mdx | Removes an orphaned duplicate API reference page. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Stripe credit balance does NOT automatically carry over when an account is converted to ChainSecured. The balance lookup chains through get_account_wallet_address(apiKeyHash) which returns the *current* on-chain admin wallet, so post-conversion the same API key resolves to a different (empty) Stripe customer. Caught by Copilot review. Also widens the auth-header phrasing to mention both X-Api-Key and Authorization: Bearer for consistency with the doc's preamble. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Audit of every Rocket route in
lit-api-server/src/, every public method inlit-static/core_sdk.js, and the published API docs surfaced two HTTP endpoints with no formal reference docs and one orphaned doc file. CPL-279 asked for a scan; this is the resulting cleanup.Documents two ChainSecured HTTP endpoints in
docs/management/api_direct.mdx:POST /create_wallet_with_signature— SIWE-signed PKP minting via DStack MPC. Request/response shapes, theAddress/Chain ID/Issued Atmessage format, the ±5-min replay window, the follow-up on-chainregisterWalletDerivationstep, and a curl example.POST /convert_to_chain_secured_account— Flips a managed account to unmanaged, preservingapiKeyHash(and therefore groups, PKPs, action metadata, usage keys, Stripe balance). Request shape and curl example. Cross-links toaccount_modes.mdxfor the dashboard flow, SDK wrapper, and post-conversion verification checklist.Cross-links rather than duplicates sovereign-mode SDK content already covered by the new
docs/management/account_modes.mdx(merged fromnextduring this branch). The four sovereign SDK methods (newChainSecuredAccount,accountExistsByHash,connectSigner, themode: 'sovereign'constructor) live there;api_direct.mdxnow points at it for context instead of restating it.Deletes orphan
docs/api_direct.mdx— slim duplicate not referenced indocs.jsonnav, no inbound links from any other doc, drifted fromdocs/management/api_direct.mdx. Net change: -403 / +63.Audit findings (per CPL-279)
Cross-referenced 33 endpoints under
/core/v1/, 35 SDK methods onLitNodeSimpleApiClient, and the docs. Already-documented endpoints/methods omitted from this PR:create_wallet_with_signature,convert_to_chain_secured_accountaccount_modes.mdxnewChainSecuredAccount,accountExistsByHash,connectSigner, sovereign-mode SDK constructor/health,/attestation,/info,/dstack/v1/*,/version,/get_lit_action_client_config,/get_chain_config_keys,/openapi.jsoncheckAbiDrift(local pinned-bytecode integrity check)Pre-Landing Review
Docs-only diff. No code paths, no SQL, no LLM trust boundaries. Internal links verified (
/management/account_modesand the#converting-an-api-account-to-chainsecuredanchor both exist post-merge). Request/response JSON shapes match the Rust structs (CreateWalletWithSignatureRequest,ConvertToChainSecuredAccountRequest) verbatim.Test plan
docs/management/api_direct.mdxwithout broken links to/management/account_modesor its#converting-an-api-account-to-chainsecuredanchor.docs/api_direct.mdxremoval does not 404 anywhere — confirmed via grep that no.mdx,.html, ordocs.jsonreferences the path.\nin the JSON body).🤖 Generated with Claude Code