Cartridge Controller is a web wallet for starknet that leverages webauthn for transaction / session authorization.
It consists of the keychain
which is a simple, sandboxed
application hosted at https://x.cartridge.gg/ and responsible for sensitive
operations, such as signing transactions. When an application requests to sign
or execute a transaction, keychain enforces client side authorization logic and
displays UI for user approval if necessary.
Interaction with the keychain
is done throught the
controller
sdk. Controller implements the account
interfaces required by starknet.js.
Underneath, the implementation communicates with an embedded sandboxed keychain
iframe.
Install pnpm via corepack:
corepack enable pnpm
Install dependencies:
pnpm i
Build dependencies:
pnpm build
Run keychain
and starknet-react-next
:
pnpm dev
Open http://localhost:3002 in your browser.
The simplest way to then develop with your cartridge account is to port it over from the production keychain:
- Login to your account at https://x.cartridge.gg/login
- Open your console, dump your account with
window.cartridge.exportAccount()
and copy it - Visting your local keychain at http://localhost:3001/
- Load your account into your local keychain
window.cartridge.importAccount("EXPORTED ACCOUNT");