8 Commits
Author SHA1 Message Date
zeekay 7282219e12 merge: pull main (CI/docker/docs cleanup, brand-neutral)
# Conflicts:
#	.dockerignore
#	app/bridge/package.json
#	compose.local.yml
#	pkg/bridge/src/app/hooks/useTransfers.ts
#	pnpm-lock.yaml
2026-05-28 01:07:23 -07:00
zeekay 8a8942ca89 feat(app/server): brand-neutral env + classes; drop NATS/Consul; m-chain via lux/mpc HTTP
User directive: 'drop LUX_ keep it brand neutral do not use nats/consul
must use standalone ~/work/lux/mpc with our native ~/work/lux/consensus
or b/m-chains'.

This commit lands all three asks.

────────────────────────────────────────────────────────────────────────
 Brand neutralization
────────────────────────────────────────────────────────────────────────
Env vars renamed (LUX_* → BRIDGE_*):
  LUX_IAM_ISSUER           → BRIDGE_IAM_ISSUER
  LUX_KMS_URL              → BRIDGE_KMS_URL
  LUX_KMS_ORG              → BRIDGE_KMS_ORG
  LUX_KMS_CLIENT_ID        → BRIDGE_IAM_CLIENT_ID
  LUX_KMS_CLIENT_SECRET    → BRIDGE_IAM_CLIENT_SECRET
  LUX_MPC_URL              → BRIDGE_MPC_URL
  (+ BRIDGE_MPC_WALLET_ID new — default wallet for native sign)

Client classes renamed (Lux* → brand-neutral):
  LuxIAMClient   → IAMClient
  LuxKMSClient   → KMSSecretClient   (avoids collision w/ AWS SDK's KMSClient)
  LuxMPCClient   → MPCClient

Audience strings renamed (lux-* → bare service name):
  'lux-kms' → 'kms'
  'lux-mpc' → 'mpc'

File renames:
  src/clients/lux-iam.ts  → src/clients/iam.ts
  src/clients/lux-kms.ts  → src/clients/kms.ts
  src/clients/lux-mpc.ts  → src/clients/mpc.ts
  (+ matching __tests__/ files)

────────────────────────────────────────────────────────────────────────
 NATS + Consul: gone
────────────────────────────────────────────────────────────────────────
Deletions:
  - app/server/src/services/mpc-service.ts      (498 LOC NATS+Consul wrapper)
  - app/server/src/utils/trigger-keygen.ts      (dev script, NATS)
  - app/server/src/scripts/trigger-keygen.ts    (dev script, NATS)
  - app/server/src/scripts/test-signing.ts      (dev script, NATS)
  - app/server/src/types/nats.d.ts              (vendored type stubs)
  - consul + nats sections of app/server/src/types/index.d.ts
  - nats + consul devDependencies in app/server/package.json
  - NATS + Consul + Vault containers in compose.local.yml

Rewritten:
  - app/server/src/domain/mpc-bridge.ts (497 → 197 LOC)
      Preserves the public surface (bridgeMPC.initialize() /
      .generateMPCSignature() / .completeSwap() / .getHealthStatus())
      so domain/mpc-modern.ts callers stay untouched. Internally:
        - One MPCClient HTTP call replaces the NATS publish + subscribe
          pub/sub dance. mpcd handles the threshold round atomically.
        - Consul KV completion marker replaced with Prisma's
          Swap.metadata_sequence_number update (single source of truth).
        - Lazy IAM + MPCClient construction so the bridge boots cleanly
          when BRIDGE_MPC_URL / BRIDGE_IAM_* are unset (standalone mode).
          Sign calls return a clear error rather than crashing the
          process.
  - app/server/src/server.ts startup: no more mpcService.initialize();
      bridgeMPC.initialize() now soft-fails (logger.warn) on missing
      env. /health endpoint reads through bridgeMPC.getHealthStatus()
      which reports { online: 0, total: 0, standalone: true } when
      MPCClient isn't configured.
  - compose.local.yml: replaces 6-service NATS/Consul/Vault topology
      with bare 3-service (iam + iam-db + bridge postgres). Out-of-band
      mpcd + KMS instructions documented in the file header.

────────────────────────────────────────────────────────────────────────
 docs/LLM.md
────────────────────────────────────────────────────────────────────────
All LUX_* env mentions retargeted to BRIDGE_*. The 'Native Lux services'
section now describes the HTTP-only, env-neutral integration pattern.
Standalone mode section unchanged in shape but with refreshed env names.

────────────────────────────────────────────────────────────────────────
 Tests + typecheck
────────────────────────────────────────────────────────────────────────
  SDK pkg/bridge:    58 / 58
  Server app/server: 123 / 123 (no regression — same set as v1.1.21
                                with renamed env vars)
  Typecheck:         clean on both packages

────────────────────────────────────────────────────────────────────────
 Net effect
────────────────────────────────────────────────────────────────────────
Bridge backend is now genuinely brand-neutral:
  - No 'LUX_' in any env var (the BRIDGE_ prefix is service-scoped, not
    brand-scoped; same prefix the SDK uses for runtime config)
  - No NATS, no Consul anywhere in the codebase or compose files
  - Native m-chain signing goes through HTTP to mpcd (the canonical
    ~/work/lux/mpc daemon, github.com/luxfi/mpc), one round-trip per
    sign, with the same wire protocol as ~/work/lux/kms/pkg/mpc/client.go
  - Standalone mode preserved: when BRIDGE_MPC_URL is unset, the bridge
    runs without crashing; sign calls return a clear error
2026-05-23 20:06:36 -07:00
venuswhispers cdd7cd9929 chore: updated env 2026-05-22 15:01:18 +02:00
zeekay 118e977946 feat: universal Teleport bridge with 35+ chain plugins
- opnet-watcher: universal binary with plugin architecture
  - 3 functional plugins (OP_NET, Solana, TON)
  - Generic EVMPlugin handles all EVM chains (Ethereum, Base, Arbitrum, etc.)
  - 17 non-EVM chain stubs (Sui, NEAR, Cosmos, XRPL, ICP, etc.)
  - Threshold signing via luxfi/crypto (CGGMP21/FROST)
  - Separate txSigner hot wallet for on-chain submission
  - Multi-tenant API with hostname-based routing
  - Confirmation depth, backing sanity checks, EIP-155 local signing
- manifests: 32 chain configs + 5 tenant configs (lux, zoo, hanzo, pars, spc)
- k8s: fix chain IDs 1330663759→4294967299, ClusterIP services, KMS secrets
- CI: conformance tests gate production deployment
2026-04-06 23:03:19 -07:00
zeekay 307e4485cc unify all sql images to :latest (PG18)
Single version policy: ghcr.io/hanzoai/sql:latest everywhere.
No version pinning, no backwards compat, always latest stable.
2026-03-01 21:08:42 -08:00
zeekay 5a036d779b unify on hanzoai/sql:17-alpine, IngressClass ingress
All postgres images → ghcr.io/hanzoai/sql:17-alpine
All ingress classes → ingress (was nginx/hanzo)
2026-03-01 20:53:34 -08:00
zeekay 28c1d082f2 refactor: migrate MPC from Docker service to native Go integration
- Remove app/mpc-service in favor of direct github.com/luxfi/mpc usage
- Add infrastructure services: Lux ID (auth), KMS (Vault), NATS, Consul
- Implement 3-node MPC network with native Go binaries
- Add comprehensive documentation for new architecture
- Update development workflow to use native tools instead of Docker
- Update CI/CD workflows for new MPC architecture
- Add .gitignore entries for MPC data and logs

This refactoring improves performance, simplifies deployment, and provides
better integration with the Lux ecosystem through unified authentication
and secure key management.
2025-08-03 21:41:49 -05:00
zeekay 2a5bda0506 Update project 2025-08-03 18:45:59 -05:00