Skip to content
Docs

Overview

Install and versions

Add client, keystore, and core, plus the SQLite driver for your platform.

Overview

Install the packages you need. Most wallet apps take @gray3/client plus @gray3/keystore; @gray3/core is pulled in as a dependency and can be imported directly for catalog helpers.

Install

Package manager
pnpm add @gray3/client @gray3/keystore @gray3/core

SQLite drivers

The keystore's SQLite drivers are optional peer dependencies. Install the one for your platform alongside @gray3/keystore:

  • better-sqlite3 for Node.js (sqlite: { path })
  • sql.js for browsers and extensions (sqlite: { web })
  • expo-sqlite for Expo and React Native (sqlite: { expo })

React Native also needs react-native-get-random-values. The full steps for each platform are in Platforms.

Versions

The packages are published under the @gray3 npm scope. Pin compatible minor versions of @gray3/client, @gray3/keystore, and @gray3/core together. The packages follow semantic versioning, and @gray3/client and @gray3/keystore declare the minimum @gray3/core version they support.

Typical imports

js
import { GrayClient, detectAddress, detectPrivateKey } from "@gray3/client";
import { GrayKeystore } from "@gray3/keystore";
import { GrayError, isGrayError, listChains } from "@gray3/core";
import { Gray } from "@gray3/cloud"; // server only