# @cartridge/controller-wasm

> Wasm bindings for Cartridge Controller and Session Account

Latest version **0.10.3** (published 2026-09-08) · 0 weekly downloads

## Install

```sh
npm install @cartridge/controller-wasm
pnpm add @cartridge/controller-wasm
yarn add @cartridge/controller-wasm
bun add @cartridge/controller-wasm
```

## Health

**Score 70/100 (B)** — status: active.

Positive: has types; esm support; no vulnerabilities; has provenance; recently updated; high maintenance score.

Warnings: low downloads; pre 1.0.

## Facts

| | |
|---|---|
| Version | 0.10.3 |
| Published | 2026-09-08 |
| First published | 2025-05-12 |
| Weekly downloads | 0 |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 3.9 MB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| GitHub stars | 3 |
| Maintainers | tarrencev, broody, c7e-steeb |

## Links

- npm: https://www.npmjs.com/package/@cartridge/controller-wasm
- Repository: https://github.com/cartridge-gg/controller-rs
- Homepage: https://github.com/cartridge-gg/controller-rs#readme
- Issues: https://github.com/cartridge-gg/controller-rs/issues
- npm.io page: https://npm.io/package/@cartridge/controller-wasm

## Recent versions

- 0.10.3 (latest) — 2026-09-08
- 0.7.14-2ebf88ab (dev) — 2026-09-08
- 0.7.14-45ea144f — 2026-09-08
- 0.10.2 — 2026-09-04
- 0.7.14-9cdde295 — 2026-09-04
- 0.10.1 — 2026-04-17
- 0.7.14-4ec2e4fc — 2026-04-17
- 0.10.0 — 2026-03-23
- 0.7.14-44f18f37 — 2026-03-23
- 0.9.6 — 2026-03-06
- 0.7.14-addbf831 — 2026-03-06
- 0.7.14-ab88a43f — 2026-03-04
- 0.9.5 — 2026-03-04
- 0.9.4 — 2026-02-13
- 0.7.14-cc79095c — 2026-02-13
- … 58 more at https://npm.io/package/@cartridge/controller-wasm/versions

## README

# Cartridge Controller

A Rust implementation of a smart contract account system for Starknet, providing account abstraction with session-based authentication, multi-owner support, and cross-platform compatibility.

## Features

- **Account Abstraction** - Smart contract accounts with programmable validation
- **Session Management** - Temporary signing keys with time-bounded, policy-based access control
- **Multi-Owner Support** - Multiple authentication methods per account:
  - Starknet native keys
  - WebAuthn/FIDO2 passkeys
  - EIP-191 Ethereum wallet signatures
- **Paymaster Integration** - Sponsored transactions via outside execution (SNIP-9)
- **Cross-Platform** - Works in browsers (WASM) and native Rust environments
- **GraphQL Backend** - Integration with Cartridge API for account and session management

## Architecture

The project consists of three main components:

| Component       | Description                                                                           |
| --------------- | ------------------------------------------------------------------------------------- |
| `account_sdk/`  | Core Rust library for account management, session handling, and Starknet interactions |
| `account-wasm/` | WebAssembly bindings exposing SDK functionality to JavaScript/TypeScript              |
| `contracts/`    | Cairo smart contracts for the controller system                                       |

## Prerequisites

| Tool    | Version             |
| ------- | ------------------- |
| Rust    | 1.92+               |
| Scarb   | 2.9.4               |
| Node.js | v20.11.1            |
| Katana  | 1.7.0 (for testing) |

## Installation

### NPM (WASM Package)

```bash
# Latest stable release
npm install @cartridge/controller-wasm

# Latest dev release
npm install @cartridge/controller-wasm@dev
```

### Rust (Cargo)

Add to your `Cargo.toml`:

```toml
[dependencies]
account_sdk = { git = "https://github.com/cartridge-gg/controller" }
```

## Development

### Building

```bash
# Build the entire workspace
cargo build

# Build WASM packages
cd account-wasm && ./build.sh

# Generate Cairo contract artifacts
make generate_artifacts
```

### Testing

```bash
# Run all tests
cargo test

# Run session-specific tests with logging
make test-session
```

### Linting

```bash
# Set up pre-commit hooks
make setup-pre-commit

# Run all linters
make lint

# Run specific linters
make lint-rust      # Rust (rustfmt + clippy)
make lint-cairo     # Cairo (scarb fmt)
make lint-prettier  # Documentation (prettier)
```

## Project Structure

```
.
├── account_sdk/          # Core Rust SDK
│   ├── src/
│   │   ├── account/      # Account and session internals
│   │   ├── graphql/      # Cartridge API integration
│   │   ├── signers/      # Multi-auth support (Starknet, WebAuthn, EIP-191)
│   │   ├── storage/      # Storage backends (memory, localStorage, file)
│   │   ├── controller.rs # Main controller implementation
│   │   └── session.rs    # Session management
│   └── artifacts/        # Compiled contract classes
├── account-wasm/         # WASM bindings for JS/TS
├── contracts/            # Cairo smart contracts
│   └── resolver/         # Name resolver contract
└── scripts/              # Utility scripts
```

## Documentation

For complete documentation, visit [docs.cartridge.gg](https://docs.cartridge.gg).

## License

Copyright Cartridge Gaming Company 2022. All rights reserved.

This software is available for non-commercial use under specific conditions. See [LICENSE](LICENSE) for details.

---
_Source: https://npm.io/package/@cartridge/controller-wasm · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
