docs: update controller documentation to reflect current interface#41
docs: update controller documentation to reflect current interface#41
Conversation
- Improve getting started guide with Quick Start section and better examples - Update configuration documentation with current ControllerOptions interface - Enhance session documentation with clearer explanations of how sessions work - Fix consistency issues in session policy structure across examples - Update Starknet React integration to use current best practices - Add configuration examples with session policies for gaming use cases - Improve overview to better highlight current capabilities Co-authored-by: Tarrence van As <tarrencev@users.noreply.github.com>
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
|
Claude finished @tarrencev's task —— View job PR Review: Controller Documentation UpdatesThis PR successfully updates the controller documentation to reflect the current interface. The changes improve clarity, accuracy, and provide better examples across all integration patterns. Review Summary:✅ StrengthsDocumentation Quality & Structure:
Code Examples & Best Practices:
Security & Performance Considerations:
|
| defaultChainId: constants.StarknetChainId.SN_SEPOLIA, | ||
|
|
||
| // RPC configuration | ||
| rpc?: string; // RPC endpoint URL (defaults to Cartridge RPC) |
There was a problem hiding this comment.
Should remain as:
chains?: Chain[]; where Chain is
export type Chain = {
rpcUrl: string;
};
| rpc?: string; // RPC endpoint URL (defaults to Cartridge RPC) | ||
|
|
||
| // Chain configuration | ||
| chainId?: string; // Chain ID (defaults to Sepolia) |
| // Advanced options | ||
| redirectUrl?: string; // Custom redirect URL after session creation |
There was a problem hiding this comment.
not an option
| // Advanced options | |
| redirectUrl?: string; // Custom redirect URL after session creation |
| ], | ||
| rpc: "https://api.cartridge.gg/x/starknet/mainnet" // sepolia, mainnet, or slot | ||
| }, | ||
| rpc: "https://api.cartridge.gg/x/starknet/sepolia" // sepolia or mainnet |
There was a problem hiding this comment.
| rpc: "https://api.cartridge.gg/x/starknet/sepolia" // sepolia or mainnet |
| const controller = new Controller({ | ||
| rpc: "https://api.cartridge.gg/x/starknet/sepolia", // or mainnet | ||
| }); |
There was a problem hiding this comment.
| const controller = new Controller({ | |
| rpc: "https://api.cartridge.gg/x/starknet/sepolia", // or mainnet | |
| }); | |
| const controller = new Controller(); |
| const connector = new ControllerConnector({ | ||
| rpc: "https://api.cartridge.gg/x/starknet/sepolia", | ||
| }); |
There was a problem hiding this comment.
| const connector = new ControllerConnector({ | |
| rpc: "https://api.cartridge.gg/x/starknet/sepolia", | |
| }); | |
| const connector = new ControllerConnector(); |
|
Claude finished @tarrencev's task —— View job ✅ PR Review Comments AddressedSuccessfully addressed all review comments about configuration parameters and code examples. Completed Tasks:
Summary of Changes:✅ configuration.md:
✅ svelte.md:
✅ getting-started.mdx:
All changes have been committed to the PR branch as requested. The documentation now correctly reflects the Commit: eda8ea0 |
- Replace rpc parameter with chains parameter in ControllerOptions - Add Chain type definition with rpcUrl property - Update chainId description to specify hex encoding - Remove redirectUrl option from ControllerOptions - Simplify Controller and ControllerConnector instantiation examples - Remove rpc parameters from all code examples Co-authored-by: Tarrence van As <tarrencev@users.noreply.github.com>
Updates the controller documentation to reflect the current state of the cartridge-gg/controller repository, focusing on the
packages/controllerpackage interface.Changes
Closes #40
Generated with Claude Code