You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs: update controller documentation to reflect current interface (#41)
* docs: update controller documentation to reflect current interface
- 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>
* fix: address PR review comments
- 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>
---------
Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
Copy file name to clipboardExpand all lines: src/pages/controller/sessions.md
+9-1Lines changed: 9 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,7 +5,15 @@ description: Learn about Cartridge Controller's session-based authentication and
5
5
6
6
# Sessions and Policies
7
7
8
-
Cartridge Controller supports session-based authorization and policy-based transaction approvals. When a policy is preapproved, games can perform interactions seamlessly without requesting approval from the player each time.
8
+
Cartridge Controller supports session-based authorization and policy-based transaction approvals. When policies are pre-approved by the user, games can execute transactions seamlessly without requesting approval for each interaction, creating a smooth gaming experience.
9
+
10
+
## How Sessions Work
11
+
12
+
1.**Policy Definition**: Games define which contract methods they need to call
13
+
2.**User Approval**: Users approve these policies once during initial connection
14
+
3.**Session Creation**: Controller creates a session with approved transaction permissions
15
+
4.**Gasless Execution**: Games can execute approved transactions without user prompts
16
+
5.**Paymaster Integration**: Transactions can be sponsored through Cartridge Paymaster
0 commit comments