Skip to content

Complete lxgr API compatibility and refresh keyword descriptions - #356

Open
patrickwieth wants to merge 4 commits into
masterfrom
fix/lxgr-rest-api-adapter
Open

patrickwieth wants to merge 4 commits into
masterfrom
fix/lxgr-rest-api-adapter

Conversation

@patrickwieth

@patrickwieth patrickwieth commented Nov 1, 2026 •

Copy link
Copy Markdown
Member

Summary

Extends this still-open PR's original lxgr REST fix with current-chain transaction compatibility and the 20 approved keyword descriptions.

  • Preserve the lxgr HTTPS endpoints, cardtestnet-14 and opt-in API flag; production keeps its legacy configuration/client.
  • Generate the current protobuf descriptor from Cardchain fa68808db06201d7102d614c37fc8f18ce08c54a / Cosmos SDK v0.53.5, with source hashes and a reproducible generator.
  • Map all 22 relevant Cardchain message names; fix UTF-8 content bytes, nested votes, encounter parameter/drawlist layouts and EncounterDo/Close dispatch.
  • Use a separately aliased CosmJS 0.39.0 signing client for current-chain operations, without replacing the legacy production SDK imports.
  • Preserve card parameters through editor/save roundtrips. Check creator/account and RPC chain ID before signing; reinstall methods after wallet changes. Unsupported methods/fields/enums and unsafe numeric IDs fail closed.
  • Save content and optional artwork atomically with one signature request instead of two queued transactions. Block duplicate submissions while pending and fix the edit flow's extra/misplaced error callback.
  • Separate confirmed transactions from UI-completion errors: a refresh exception after code 0 is an informational refresh notice, not Update Card failed. Browser-extension sidePanel/user-gesture policies are not bypassed.
  • Correct the existing four authz permission type URLs for the current chain. No gameclient changes.
  • Synchronize the 20 approved descriptions from Cardobject #108, commit 3cb0a830af0a3896f4c91dd56d88ea94e97c68c8. Keep the frontend's deployed grammar/class permissions unchanged: this does not silently enable the separately approved Body Count/Autopsy class expansions before the chain supports them.

Validation

  • All Cardobject tests and the existing schema generator tests pass; exactly 20 description changes relative to the preserved class-approval commit.
  • Frontend compatibility, environment, icon and transaction tests pass.
  • Actual SDK-client wiring tests verify both legacy production and current-chain paths across signer connect/disconnect; bank message type URLs stay unchanged.
  • All 22 message fixtures independently decoded/re-encoded by the current Go SDK interface registry, including exact field-value comparison.
  • Real signed transactions on a fresh isolated local chain save content and artwork together with exactly one signature; REST readback verifies Unicode, notes, artist, image, balance anchor and parameters. A second-message artwork failure rolls back the first content/artist update too. A different signer is rejected; wrong-chain and disconnected-wallet guards pass.
  • Tests execute the actual Card Creator submit method: duplicate clicks queue only one update; wallet rejection never reports success; a UI-refresh exception after confirmation never invokes the update-failed callback.
  • Production and development builds pass, including TypeScript checks.
  • Browser regression against the actual lxgr backend still shows 552 cards, successful detail requests and no REST/page errors.

The local signing test uses only freshly generated disposable accounts. No real wallet, live-chain transactions, private keys or test node databases are included. Amino-only wallets are explicitly unsupported for current custom messages. Real Keplr/hardware-wallet signing still requires owner-controlled testing.

No chain upgrade, genesis rewrite, CardchainCS or gameclient modifications. Frame/authoring policy is unchanged. See docs/current-chain-transactions.md for reproducible checks and limitations.

@patrickwieth

Copy link
Copy Markdown
Member Author

Recovery verified after deployment: https://github.com/DecentralCardGame/frontend/actions/runs/41290846082 . A fresh Chromium session on the public https://lxgr.xyz/#/gallery shows 552 results, successfully loads card details from lxgr.xyz:1318, and reports no REST failures or page errors. CI also passes. Please merge this fix so future master-based deployments retain the adapter flag. No chain state was modified.

@patrickwieth patrickwieth changed the title Fix empty lxgr gallery by enabling the current REST API adapter Complete lxgr API compatibility and refresh keyword descriptions Nov 1, 2026
@patrickwieth

Copy link
Copy Markdown
Member Author

Updated deployment verified: https://github.com/DecentralCardGame/frontend/actions/runs/41344541449 . Public lxgr.xyz serves index-JYyEtLK0.js, shows 552 gallery results, loads card details without REST/page errors and includes all 20 approved descriptions and the current transaction namespace. Both frontend CI and Cardobject #108 CI pass. Actual signed save/artwork tests passed on an isolated local chain; no real player wallet or live-chain transaction was used. crowdcontrol.network still serves its previous index-BfWoyMeU.js and production endpoint. This PR now includes the full API compatibility fix; please merge it to retain the deployed changes.

@patrickwieth

Copy link
Copy Markdown
Member Author

Follow-up for contradictory card-update notifications is live (8ad14b0): one atomic content/artwork transaction, duplicate-click guard, separate confirmed/UI-refresh error paths, and corrected callbacks for artist-only uploads. Real isolated signing verifies exactly one signature and rollback when the second message fails. Tests exercise the actual Creator submit/artist methods; CI passes. Deployment run 41391305885 passed on retry (the first attempt returned nonzero after completing the build). Public index-C4PST_5Z.js, CardCreatorPage-DVWeRLrv.js and useTx-eSf_UkXd.js match local build SHA-256 hashes exactly. Public gallery still shows 552 cards; Creator renders without page errors. Real browser-wallet signing remains owner-controlled; no extension user-gesture restrictions are bypassed.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant