Files
zeekay 7200114387 Merge upstream/dev (52 commits) + sweep yarn → pnpm
Upstream merge brings 52 commits from safe-global/safe-wallet-monorepo
into the luxfi/safe-wallet@dev fork.

Conflicts resolved:
- yarn.lock: deleted (we are on pnpm)
- apps/web/package.json: kept pnpm version + brand build scripts
  (build:safe / build:lux / build:hanzo) plus upstream's new
  generate-version.mjs step
- apps/mobile/.../Signer/appKit.ts: took upstream's import pattern
  for shared/projectId, shared/metadata, shared/mmkvStorageAdapter

Yarn sweep applied to 42 files (docs, github-actions, workflows, AGENTS,
specs, codemods, scripts, READMEs). Net result: zero yarn-* command
references anywhere outside node_modules.

  ❯ pnpm is the law in this fork. No yarn.
2026-05-27 03:25:16 -07:00
..

@safe-global/store

This is a utility package that deals with the state management of the application. It uses the Redux Toolkit to manage the state of the application.

Usage

The use the generated API you first need to initialiize the baseURL of the API.

import { setBaseUrl } from '@safe-global/store'

setBaseUrl('YOUR_API_BASE_URL')

Automatic code generation from the Client Gateway's OpenAPI

This package includes a script to generate the necessary boilerplate API code from the Client Gateway (CGW)'s OpenAPI specification using @rtk-query/codegen-openapi.

Prerequisites

  1. You've initialized the monorepo and installed all dependencies.
  2. The openapi-config.ts file is correctly configured in this package with your OpenAPI specification details.
  3. If you're running your own CGW service, set the PRODUCTION_CGW_API_URL env variable.

Running the Code Generation Script

From the mono-repo root directory, run the following command:

pnpm --filter @safe-global/store build

or, for staging API:

pnpm --filter @safe-global/store build:dev

This will:

  • Fetch the OpenAPI schema.
  • Use the configuration provided in the openapi-config.ts file.
  • Generate the API code using @rtk-query/codegen-openapi.