This PR moves CIP-30 and Paima related code to a separate addons that can be used in their own.
Changes:
Custom HTML shell is removed
Creation of window.cardano.godot JS object and wrapping of GDScript callbacks to JS Promises now implemented in GDScript code of CIP-30 addon via JavaScriptBridnge.eval
Importing Paima endpoints and adding them to window.paima_endpoints (where gdscript can get them) is done via web-export settings (export_presets.cfg). Tried also JavaScriptBridnge.eval, but script fails to run as environment, where import happens, is not module, error: Uncaught SyntaxError: Cannot use import statement outside a module Could not find workaround yet.
Paima middleware code split into base wrapper for Paima middleware and and game specific middleware
base middleware: logging in, getting endpoints, wallet state and round executor; moved to addon dir
game specific middleware: submitting moves, holding to game state; located in the demo dir
base middleware wrapper can now use any supported wallet for connection
also added GDScript wrapper for RoundExecutor with helper functions
Added GDScript "interface" for CIP-30 wallet. Demo codebase now uses implementation of this interface for SingleAddressWallet to create CIP-30 callbacks
This PR moves CIP-30 and Paima related code to a separate addons that can be used in their own. Changes:
window.cardano.godot
JS object and wrapping of GDScript callbacks to JS Promises now implemented in GDScript code of CIP-30 addon viaJavaScriptBridnge.eval
window.paima_endpoints
(where gdscript can get them) is done via web-export settings (export_presets.cfg). Tried alsoJavaScriptBridnge.eval
, but script fails to run as environment, where import happens, is notmodule
, error:Uncaught SyntaxError: Cannot use import statement outside a module
Could not find workaround yet.SingleAddressWallet
to create CIP-30 callbacks