Skip to content

Native HMAC apiSigner and signed infoRollup appKeys - #6183

Draft
paullinator wants to merge 6 commits into
developfrom
paul/nativeHmacApiSigner
Draft

Native HMAC apiSigner and signed infoRollup appKeys#6183
paullinator wants to merge 6 commits into
developfrom
paul/nativeHmacApiSigner

Conversation

@paullinator

@paullinator paullinator commented Aug 29, 2026

Copy link
Copy Markdown
Member

CHANGELOG

Does this branch warrant an entry to the CHANGELOG?

  • Yes
  • No

Dependencies

Requirements

If you have made any visual changes to the GUI. Make sure you have:

  • Tested on iOS device
  • Tested on Android device
  • Tested on small-screen device (iPod Touch)
  • Tested on large-screen device (tablet)

Description

Splits runtime env.json into non-secret config.json and secret keys.json, with four plugin maps (corePlugins, swapPlugins, guiApiKeys, rampPlugins) plus globalKeys. WalletConnect is globalKeys.WALLETCONNECT_PROJECT_ID. Plugin maps are opaque objects (no field-by-field *_INIT / *_API_KEY flattening).

Fetches remote secrets from signed GET /v1/infoRollup/:appId as sibling appKeys (partner id config.appId ?? 'edge'), with DeviceSettings getKeysCache and baked-in keys.json as fallbacks. GET /v1/getKeys is gone. pluginApiKeys.posthog is never served.

Adds a native Edge API HMAC signer (edgeKey.json + XOR-split C shards) so login-server requests can be signed outside the JS bundle via apiSigner, with JS KEYS.EDGE_API_* remaining as a fallback.

Rebased onto current develop (keeps Swapter and marketing-push tracking).

Apply strict-boolean, nullish, and return-type fixes in files leaving
the relaxed-rules list.
Single-flight the initial load and serialize every write through a
promise chain so overlapping patches cannot clobber each other or
blank on-disk fields. Adds keysCache fields for remote key fetch.
Replace the flat env.json/ENV singleton with config.json + keys.json and
runtime CONFIG, KEYS, globalKeys, and pluginMaps accessors. Partner
secrets live nested under globalKeys.
Boot from baked-in KEYS, then overlay a signed infoRollup appKeys payload and device
cache. Mutate KEYS and globalKeys in place and rebuild pluginMaps.
Print only LAYER-* overlay markers from the local info_keys seed, plus whether the native signer loaded, so device e2e can confirm remote key fetch without dumping secrets.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant