Files
genesis/cmd
zeekayandHanzo Dev 81209d2fda createchaintx: read the mnemonic from luxfi/kms, not Infisical
fetchKMSMnemonic called Infisical v3 raw secrets:

  GET ${KMS_ENDPOINT}/api/v3/secrets/raw?workspaceId=..&environment=prod&secretPath=..

That endpoint is not served by kms.lux.network or kms.hanzo.ai. Both answer it
with the console SPA HTML, so the JSON decode failed and no mnemonic was ever
retrievable this way — while the function, its env vars and its log line all
called it KMS.

Now it speaks the one documented HTTP surface, which luxfi/kms describes as the
only way to read a secret:

  GET ${KMS_ENDPOINT}/v1/kms/orgs/<org>/secrets/lux/<env>/staking/mnemonic
  Authorization: Bearer ${KMS_TOKEN}   (IAM-signed, resolved to <org>)
  -> {"secret": {"value": "..."}}

The server splits the path at its last slash into (path, name), so the secret
path still disambiguates the luxd env. ?env= is the KMS environment slug and
defaults to "default", matching the luxfi/kms client KMS_ENV.

KMS_WORKSPACE_ID is gone — an Infisical concept with no meaning here. Scope is
the org in the path: KMS_ORG, defaulting to lux. No compat shim; the old call
never worked.

Co-authored-by: Hanzo Dev <dev@hanzo.ai>
2026-07-25 16:38:38 -07:00
..