Cartridge Controller
Cartridge Controller can be integrated to your app with Starknetkit. Cartridge Controller is a gaming-focused smart contract wallet that makes Web3 gaming accessible and fun through Session Keys, seamlessly handling player onboarding, transaction management, and identity customization while maintaining compatibility with other wallets that implement the plugin account architecture.
Establishing a Connection with CartridgeController
To enable the Cartridge Controller, you need to first import the CartridgeController
object from Starknetkit:
import { connect, disconnect } from "starknetkit"
import { ControllerConnector } from "starknetkit/controller"
After importing, you need to call the connect
method, passing in your CartridgeController
connector:
const { wallet } = await connect({
connectors: [
// Will connect to Mainnet by default
new ControllerConnector()
// Alternative to connect to Sepolia
new ControllerConnector({ defaultChainId: constants.StarknetChainId.SN_SEPOLIA })
// Note that Controller is only available on Mainnet and Sepolia
],
})
You will find more informations about the Cartridge Controller in the Cartridge docs (opens in a new tab).