Full SDK reference: Gemma 4 SDK
Overview
@grantex/gemma brings Grantex authorization to edge devices running Google Gemma models. Agents fetch a consent bundle while online, then verify permissions and log actions entirely offline.
Key Capabilities
- Consent bundles — fetch signed grant tokens + JWKS keys, encrypt locally with AES-256-GCM
- Offline JWT verification — verify scopes on-device using embedded JWKS snapshot, zero network calls
- Tamper-evident audit logging — hash-chained, Ed25519-signed JSONL logs, sync to cloud when connectivity returns
- Framework adapters — wraps Google ADK and LangChain tools with automatic auth enforcement
Install
Quick Start
Links
- Full SDK Reference — complete API docs for all functions
- npm: @grantex/gemma
- Blog: Offline Authorization for Gemma 4 Agents