@hsuite/smart-engines-cli 3.2.0 → 4.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (85) hide show
  1. package/README.md +122 -37
  2. package/dist/_lib/attestation.d.ts +14 -5
  3. package/dist/_lib/attestation.d.ts.map +1 -1
  4. package/dist/_lib/attestation.js +27 -7
  5. package/dist/_lib/attestation.js.map +1 -1
  6. package/dist/_lib/baas.d.ts +5 -2
  7. package/dist/_lib/baas.d.ts.map +1 -1
  8. package/dist/_lib/baas.js +4 -9
  9. package/dist/_lib/baas.js.map +1 -1
  10. package/dist/_lib/cluster-convergence.d.ts +1 -1
  11. package/dist/_lib/cluster-convergence.d.ts.map +1 -1
  12. package/dist/_lib/deposit-verification.d.ts.map +1 -1
  13. package/dist/_lib/deposit-verification.js +0 -1
  14. package/dist/_lib/deposit-verification.js.map +1 -1
  15. package/dist/_lib/env.d.ts +2 -7
  16. package/dist/_lib/env.d.ts.map +1 -1
  17. package/dist/_lib/env.js +7 -30
  18. package/dist/_lib/env.js.map +1 -1
  19. package/dist/_lib/owner-signer.d.ts +110 -0
  20. package/dist/_lib/owner-signer.d.ts.map +1 -0
  21. package/dist/_lib/owner-signer.js +477 -0
  22. package/dist/_lib/owner-signer.js.map +1 -0
  23. package/dist/_lib/runtime-env.d.ts +36 -58
  24. package/dist/_lib/runtime-env.d.ts.map +1 -1
  25. package/dist/_lib/runtime-env.js +80 -62
  26. package/dist/_lib/runtime-env.js.map +1 -1
  27. package/dist/_lib/shell-env.d.ts +16 -0
  28. package/dist/_lib/shell-env.d.ts.map +1 -0
  29. package/dist/_lib/shell-env.js +95 -0
  30. package/dist/_lib/shell-env.js.map +1 -0
  31. package/dist/_lib/subscription-client.d.ts +12 -9
  32. package/dist/_lib/subscription-client.d.ts.map +1 -1
  33. package/dist/_lib/subscription-client.js +5 -7
  34. package/dist/_lib/subscription-client.js.map +1 -1
  35. package/dist/_lib/subscription-env.d.ts +1 -5
  36. package/dist/_lib/subscription-env.d.ts.map +1 -1
  37. package/dist/_lib/subscription-env.js +0 -9
  38. package/dist/_lib/subscription-env.js.map +1 -1
  39. package/dist/commands/app-lifecycle.d.ts.map +1 -1
  40. package/dist/commands/app-lifecycle.js +8 -6
  41. package/dist/commands/app-lifecycle.js.map +1 -1
  42. package/dist/commands/ci.d.ts.map +1 -1
  43. package/dist/commands/ci.js +19 -17
  44. package/dist/commands/ci.js.map +1 -1
  45. package/dist/commands/customer-scope.d.ts +5 -2
  46. package/dist/commands/customer-scope.d.ts.map +1 -1
  47. package/dist/commands/customer-scope.js +12 -13
  48. package/dist/commands/customer-scope.js.map +1 -1
  49. package/dist/commands/deploy.d.ts +0 -7
  50. package/dist/commands/deploy.d.ts.map +1 -1
  51. package/dist/commands/deploy.js +26 -33
  52. package/dist/commands/deploy.js.map +1 -1
  53. package/dist/commands/faucet.d.ts +12 -10
  54. package/dist/commands/faucet.d.ts.map +1 -1
  55. package/dist/commands/faucet.js +14 -23
  56. package/dist/commands/faucet.js.map +1 -1
  57. package/dist/commands/init.d.ts.map +1 -1
  58. package/dist/commands/init.js +10 -2
  59. package/dist/commands/init.js.map +1 -1
  60. package/dist/commands/redeploy.d.ts +0 -6
  61. package/dist/commands/redeploy.d.ts.map +1 -1
  62. package/dist/commands/redeploy.js +21 -22
  63. package/dist/commands/redeploy.js.map +1 -1
  64. package/dist/commands/renew.d.ts +2 -1
  65. package/dist/commands/renew.d.ts.map +1 -1
  66. package/dist/commands/renew.js +15 -10
  67. package/dist/commands/renew.js.map +1 -1
  68. package/dist/commands/status.d.ts.map +1 -1
  69. package/dist/commands/status.js +2 -1
  70. package/dist/commands/status.js.map +1 -1
  71. package/dist/commands/subscribe.d.ts +8 -9
  72. package/dist/commands/subscribe.d.ts.map +1 -1
  73. package/dist/commands/subscribe.js +25 -27
  74. package/dist/commands/subscribe.js.map +1 -1
  75. package/dist/commands/topup.d.ts +2 -1
  76. package/dist/commands/topup.d.ts.map +1 -1
  77. package/dist/commands/topup.js +9 -7
  78. package/dist/commands/topup.js.map +1 -1
  79. package/dist/commands/update.d.ts +3 -3
  80. package/dist/commands/update.d.ts.map +1 -1
  81. package/dist/commands/update.js +12 -5
  82. package/dist/commands/update.js.map +1 -1
  83. package/dist/index.js +5 -2
  84. package/dist/index.js.map +1 -1
  85. package/package.json +2 -2
@@ -12,83 +12,68 @@
12
12
  * -----------------------------------
13
13
  * EVERY key in `.env.local` is forwarded EXCEPT {@link NON_FORWARDED_KEYS} — so
14
14
  * ANY variable the app reads (including ones this CLI has never heard of) "just
15
- * works" in the deployed container. The denylist withholds only:
15
+ * works" in the deployed container. The denylist withholds:
16
16
  *
17
17
  * 1. The PLATFORM-RESOLVED connection URLs (`SMART_HOST_URL` / `VALIDATOR_URL`
18
18
  * / `GATEWAY_URL`). Locally these point at the public testnet gateway (from
19
19
  * `hsuite init`); IN-CLUSTER the deployer's cluster-env injects the INTERNAL
20
20
  * service URL plus a TSS-minted `APP_TOKEN`. Forwarding the developer's
21
21
  * external URL would OVERRIDE the internal one, and the pod would try to
22
- * reach the public gateway from inside the cluster (unreachable) → the app
23
- * silently boots open/in-memory mode. So these are cluster-resolved, never
24
- * forwarded — the SDK consumes them via `BaasClient.fromEnv`.
22
+ * reach the public gateway from inside the cluster (unreachable). So these
23
+ * are cluster-resolved, never forwarded — the SDK consumes them via
24
+ * `BaasClient.fromEnv`.
25
25
  * 2. The LOCAL-ONLY safety toggles (`DEV_MODE` / `ALLOW_INSECURE`) — a stale
26
26
  * `true` in a developer's `.env.local` must never silently propagate into a
27
27
  * live deployment. A deploy that genuinely needs one sets it explicitly via
28
28
  * `manifest.backend.env`.
29
+ * 3. The CLI's own bookkeeping (`SUBSCRIPTION_PENDING_*`).
30
+ * 4. The OWNER'S KEY MATERIAL ({@link OWNER_ONLY_KEYS}: `XRPL_SEED`,
31
+ * `XRPL_PRIVATE_KEY`, `HSUITE_SIGNER`), #3004. It never leaves the
32
+ * developer's machine, and `manifest.backend.env` may not carry it either.
29
33
  *
30
- * The developer's identity secret (`XRPL_SEED`, whose wallet holds the
31
- * subscription NFT) IS forwarded — the app uses it for owner-signed chain ops;
32
- * the in-cluster BaaS *session* itself comes from the deployer's `APP_TOKEN`, not
33
- * from a challenge.
34
+ * The deployed app's backend authenticates to the BaaS host with the
35
+ * deployer-minted app token (`APP_TOKEN` / `APP_TOKEN_FILE`, injected by the
36
+ * cluster-env), for data-plane access only. Owner operations (deploy, suspend,
37
+ * resume, delete, credentials, entity and agent creation) are done by the owner
38
+ * from this CLI, never from inside the container.
34
39
  */
35
- import type { EnvMap } from './env';
40
+ import { type EnvMap } from './env';
36
41
  /**
37
- * Keys withheld from customer-env forwarding. See the file header for the two
38
- * classes (platform-resolved connection URLs + local-only safety toggles) and
39
- * WHY forwarding them breaks or endangers a deployment. Everything else in
40
- * `.env.local` is forwarded verbatim.
42
+ * The owner's key material: never forwarded from `.env.local`, refused from
43
+ * `manifest.backend.env`, and refused by `hsuite update --env-set`.
44
+ */
45
+ export declare const OWNER_ONLY_KEYS: ReadonlySet<string>;
46
+ /**
47
+ * Keys withheld from customer-env forwarding. See the file header for the
48
+ * classes and WHY forwarding them breaks or endangers a deployment. Everything
49
+ * else in `.env.local` is forwarded verbatim.
41
50
  */
42
51
  export declare const NON_FORWARDED_KEYS: ReadonlySet<string>;
43
52
  /**
44
- * Keys whose presence lets the deployed app authenticate as the developer's
45
- * wallet for owner-signed chain operations. `XRPL_SEED` is forwarded (it is NOT
46
- * on the denylist); this guard fails a deploy loud rather than silently shipping
47
- * an app with no owner key, unless `allowOpenMode` opts into a zero-cred fork.
48
- *
49
- * (The in-cluster BaaS *session* comes from the deployer's `APP_TOKEN`, so a
50
- * deployed app reaches cluster mode regardless; this guard is about the owner
51
- * signing key the developer almost always intends to ship.)
53
+ * Printed once by `deploy` / `redeploy`. A deploy or redeploy sends the whole
54
+ * runtime env map, and the host replaces the stored map with it, so the stored copy
55
+ * of an `XRPL_SEED` an older CLI forwarded is dropped. That does NOT undo the exposure: the
56
+ * seed was readable by the app's code and anyone who could exec into the container.
52
57
  */
53
- export declare const CLUSTER_MODE_REQUIRED_KEYS: readonly string[];
54
- export interface ResolveRuntimeEnvInput {
55
- /** The parsed `.env.local` (developer runtime + deploy-time creds). */
58
+ export declare const OLDER_CLI_SEED_NOTICE: string;
59
+ export type ResolveRuntimeEnvInput = {
60
+ /** The parsed `.env.local` (developer runtime config + the owner's own credentials). */
56
61
  env: EnvMap;
57
62
  /** `manifest.backend.env` — explicit, committed, NON-secret overrides. */
58
63
  manifestEnv?: Record<string, string>;
59
- /**
60
- * Opt-in escape hatch for an intentional zero-cred deploy — e.g. a fork demo
61
- * the developer wants to run without shipping their `XRPL_SEED`.
62
- *
63
- * When true, `XRPL_SEED` is DELIBERATELY WITHHELD from the forwarded container
64
- * env and the fail-loud {@link OpenModeDeployError} is suppressed. The seed
65
- * still exists in `.env.local` for the local deploy-time work (auth +
66
- * attestation signing) — it is just not injected into the running container.
67
- */
68
- allowOpenMode?: boolean;
69
64
  /**
70
65
  * Optional sink for non-fatal advisories (e.g. a secret-shaped key found in the
71
66
  * committed manifest surface). Injected by the command so warnings surface to
72
67
  * the operator; omitted in unit tests that assert the pure merge.
73
68
  */
74
69
  warn?: (message: string) => void;
75
- }
76
- /**
77
- * A credential-less deploy was blocked. Thrown by {@link resolveRuntimeEnv} when
78
- * the resolved container env carries no `XRPL_SEED` and `allowOpenMode` is not
79
- * set — so a deploy never SILENTLY ships an app with no owner signing key. The
80
- * remedy (populate `.env.local` via `hsuite init` + `hsuite subscribe`, or opt
81
- * in explicitly) is on the message.
82
- */
83
- export declare class OpenModeDeployError extends Error {
84
- constructor(missing: readonly string[]);
85
- }
70
+ };
86
71
  /**
87
72
  * Resolve the runtime env the deployed container should receive.
88
73
  *
89
74
  * Merge + precedence (#2902):
90
- * 1. Forward EVERY var from `.env.local` EXCEPT {@link NON_FORWARDED_KEYS}
91
- * (platform-resolved URLs + local-only toggles). Empty values are dropped.
75
+ * 1. Forward EVERY var from `.env.local` EXCEPT {@link NON_FORWARDED_KEYS}.
76
+ * Empty values are dropped.
92
77
  * 2. Overlay `manifest.backend.env` for keys `.env.local` does NOT carry —
93
78
  * a NON-empty `.env.local` value WINS over the manifest, and each
94
79
  * collision warns per key naming the winner. The manifest remains the
@@ -99,18 +84,11 @@ export declare class OpenModeDeployError extends Error {
99
84
  * Rationale for .env.local-wins (#2902): with manifest-wins, editing an
100
85
  * EXISTING key in `.env.local` was a silent no-op — the value a developer
101
86
  * committed into the manifest during local dev shadowed every later local
102
- * edit across deploys (new keys landed, modified keys stayed stale). The
103
- * developer's most recent deliberate edit is the one in `.env.local`; a
104
- * colliding committed manifest value now loses loudly instead of winning
105
- * silently. An empty `.env.local` value is dropped in step 1 and therefore
106
- * counts as unset — such a key still comes from the manifest.
107
- *
108
- * Fail-loud: if the merged result has no `XRPL_SEED` and `allowOpenMode` is not
109
- * set, throws {@link OpenModeDeployError} rather than shipping a silent
110
- * credential-less app.
87
+ * edit across deploys. An empty `.env.local` value is dropped in step 1 and
88
+ * therefore counts as unset — such a key still comes from the manifest.
111
89
  *
112
- * @throws {OpenModeDeployError} when the resolved env is credential-less and
113
- * `allowOpenMode` is not set.
90
+ * @throws when `manifest.backend.env` sets one of {@link OWNER_ONLY_KEYS}. The
91
+ * message names the key, never its value.
114
92
  */
115
93
  export declare function resolveRuntimeEnv(input: ResolveRuntimeEnvInput): Record<string, string>;
116
94
  //# sourceMappingURL=runtime-env.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"runtime-env.d.ts","sourceRoot":"","sources":["../../src/_lib/runtime-env.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAEpC;;;;;GAKG;AACH,eAAO,MAAM,kBAAkB,EAAE,WAAW,CAAC,MAAM,CAiBjD,CAAC;AAEH;;;;;;;;;GASG;AACH,eAAO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,CAAC;AAWF;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,sBAAsB,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAmDvF"}
@@ -1,12 +1,60 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.OpenModeDeployError = exports.CLUSTER_MODE_REQUIRED_KEYS = exports.NON_FORWARDED_KEYS = void 0;
3
+ exports.OLDER_CLI_SEED_NOTICE = exports.NON_FORWARDED_KEYS = exports.OWNER_ONLY_KEYS = void 0;
4
4
  exports.resolveRuntimeEnv = resolveRuntimeEnv;
5
5
  /**
6
- * Keys withheld from customer-env forwarding. See the file header for the two
7
- * classes (platform-resolved connection URLs + local-only safety toggles) and
8
- * WHY forwarding them breaks or endangers a deployment. Everything else in
9
- * `.env.local` is forwarded verbatim.
6
+ * Runtime-env forwarding for `hsuite deploy` / `hsuite redeploy`.
7
+ *
8
+ * THE MODEL
9
+ * ---------
10
+ * The CLI reads the developer's `.env.local` (`--env`) and forwards its runtime
11
+ * vars into the deployed customer-env — the per-app k8s Secret the deployer
12
+ * mirrors, PQC-encrypted (kyber-aes-v1) at rest. So the deployed app runs with
13
+ * the SAME config the developer runs locally, with no allowlist to maintain.
14
+ *
15
+ * FORWARD-ALL, MINUS A SMALL DENYLIST
16
+ * -----------------------------------
17
+ * EVERY key in `.env.local` is forwarded EXCEPT {@link NON_FORWARDED_KEYS} — so
18
+ * ANY variable the app reads (including ones this CLI has never heard of) "just
19
+ * works" in the deployed container. The denylist withholds:
20
+ *
21
+ * 1. The PLATFORM-RESOLVED connection URLs (`SMART_HOST_URL` / `VALIDATOR_URL`
22
+ * / `GATEWAY_URL`). Locally these point at the public testnet gateway (from
23
+ * `hsuite init`); IN-CLUSTER the deployer's cluster-env injects the INTERNAL
24
+ * service URL plus a TSS-minted `APP_TOKEN`. Forwarding the developer's
25
+ * external URL would OVERRIDE the internal one, and the pod would try to
26
+ * reach the public gateway from inside the cluster (unreachable). So these
27
+ * are cluster-resolved, never forwarded — the SDK consumes them via
28
+ * `BaasClient.fromEnv`.
29
+ * 2. The LOCAL-ONLY safety toggles (`DEV_MODE` / `ALLOW_INSECURE`) — a stale
30
+ * `true` in a developer's `.env.local` must never silently propagate into a
31
+ * live deployment. A deploy that genuinely needs one sets it explicitly via
32
+ * `manifest.backend.env`.
33
+ * 3. The CLI's own bookkeeping (`SUBSCRIPTION_PENDING_*`).
34
+ * 4. The OWNER'S KEY MATERIAL ({@link OWNER_ONLY_KEYS}: `XRPL_SEED`,
35
+ * `XRPL_PRIVATE_KEY`, `HSUITE_SIGNER`), #3004. It never leaves the
36
+ * developer's machine, and `manifest.backend.env` may not carry it either.
37
+ *
38
+ * The deployed app's backend authenticates to the BaaS host with the
39
+ * deployer-minted app token (`APP_TOKEN` / `APP_TOKEN_FILE`, injected by the
40
+ * cluster-env), for data-plane access only. Owner operations (deploy, suspend,
41
+ * resume, delete, credentials, entity and agent creation) are done by the owner
42
+ * from this CLI, never from inside the container.
43
+ */
44
+ const env_1 = require("./env");
45
+ /**
46
+ * The owner's key material: never forwarded from `.env.local`, refused from
47
+ * `manifest.backend.env`, and refused by `hsuite update --env-set`.
48
+ */
49
+ exports.OWNER_ONLY_KEYS = new Set([
50
+ 'XRPL_SEED',
51
+ 'XRPL_PRIVATE_KEY',
52
+ 'HSUITE_SIGNER',
53
+ ]);
54
+ /**
55
+ * Keys withheld from customer-env forwarding. See the file header for the
56
+ * classes and WHY forwarding them breaks or endangers a deployment. Everything
57
+ * else in `.env.local` is forwarded verbatim.
10
58
  */
11
59
  exports.NON_FORWARDED_KEYS = new Set([
12
60
  // Platform-resolved connection URLs — the deployer injects the INTERNAL ones
@@ -25,18 +73,18 @@ exports.NON_FORWARDED_KEYS = new Set([
25
73
  'SUBSCRIPTION_PENDING_PAYMENT',
26
74
  // And the same for `hsuite topup`'s credit payment (#3917 item 5).
27
75
  'SUBSCRIPTION_PENDING_TOPUP_PAYMENT',
76
+ // The owner's key material (#3004): never shipped to a container.
77
+ ...exports.OWNER_ONLY_KEYS,
28
78
  ]);
29
79
  /**
30
- * Keys whose presence lets the deployed app authenticate as the developer's
31
- * wallet for owner-signed chain operations. `XRPL_SEED` is forwarded (it is NOT
32
- * on the denylist); this guard fails a deploy loud rather than silently shipping
33
- * an app with no owner key, unless `allowOpenMode` opts into a zero-cred fork.
34
- *
35
- * (The in-cluster BaaS *session* comes from the deployer's `APP_TOKEN`, so a
36
- * deployed app reaches cluster mode regardless; this guard is about the owner
37
- * signing key the developer almost always intends to ship.)
80
+ * Printed once by `deploy` / `redeploy`. A deploy or redeploy sends the whole
81
+ * runtime env map, and the host replaces the stored map with it, so the stored copy
82
+ * of an `XRPL_SEED` an older CLI forwarded is dropped. That does NOT undo the exposure: the
83
+ * seed was readable by the app's code and anyone who could exec into the container.
38
84
  */
39
- exports.CLUSTER_MODE_REQUIRED_KEYS = ['XRPL_SEED'];
85
+ exports.OLDER_CLI_SEED_NOTICE = 'An app deployed by an older CLI may have received XRPL_SEED in its runtime env. ' +
86
+ 'This deploy replaces the stored env, but that seed was already exposed to the container: ' +
87
+ 'treat it as compromised and rotate it.';
40
88
  /**
41
89
  * Heuristic: does a key name look like a secret? Used only to WARN when such a
42
90
  * key appears in `manifest.backend.env` — the committed, typically git-tracked
@@ -45,31 +93,12 @@ exports.CLUSTER_MODE_REQUIRED_KEYS = ['XRPL_SEED'];
45
93
  function looksLikeSecretKey(key) {
46
94
  return /(_SEED|_PRIVATE_KEY|_API_KEY|_SECRET|_TOKEN|_PASSWORD|_MNEMONIC)$/.test(key);
47
95
  }
48
- /**
49
- * A credential-less deploy was blocked. Thrown by {@link resolveRuntimeEnv} when
50
- * the resolved container env carries no `XRPL_SEED` and `allowOpenMode` is not
51
- * set — so a deploy never SILENTLY ships an app with no owner signing key. The
52
- * remedy (populate `.env.local` via `hsuite init` + `hsuite subscribe`, or opt
53
- * in explicitly) is on the message.
54
- */
55
- class OpenModeDeployError extends Error {
56
- constructor(missing) {
57
- super(`Refusing to deploy a credential-less app: the resolved container env is ` +
58
- `missing ${missing.join(', ')}. The deployed smart-app signs owner ops ` +
59
- `with YOUR XRPL wallet (the XRPL_SEED in --env), which holds the ` +
60
- `subscription NFT. Run \`hsuite init\` + \`hsuite subscribe\` so ` +
61
- `.env.local carries the creds, or pass --allow-open-mode for an ` +
62
- `intentional zero-cred fork deploy.`);
63
- this.name = 'OpenModeDeployError';
64
- }
65
- }
66
- exports.OpenModeDeployError = OpenModeDeployError;
67
96
  /**
68
97
  * Resolve the runtime env the deployed container should receive.
69
98
  *
70
99
  * Merge + precedence (#2902):
71
- * 1. Forward EVERY var from `.env.local` EXCEPT {@link NON_FORWARDED_KEYS}
72
- * (platform-resolved URLs + local-only toggles). Empty values are dropped.
100
+ * 1. Forward EVERY var from `.env.local` EXCEPT {@link NON_FORWARDED_KEYS}.
101
+ * Empty values are dropped.
73
102
  * 2. Overlay `manifest.backend.env` for keys `.env.local` does NOT carry —
74
103
  * a NON-empty `.env.local` value WINS over the manifest, and each
75
104
  * collision warns per key naming the winner. The manifest remains the
@@ -80,31 +109,27 @@ exports.OpenModeDeployError = OpenModeDeployError;
80
109
  * Rationale for .env.local-wins (#2902): with manifest-wins, editing an
81
110
  * EXISTING key in `.env.local` was a silent no-op — the value a developer
82
111
  * committed into the manifest during local dev shadowed every later local
83
- * edit across deploys (new keys landed, modified keys stayed stale). The
84
- * developer's most recent deliberate edit is the one in `.env.local`; a
85
- * colliding committed manifest value now loses loudly instead of winning
86
- * silently. An empty `.env.local` value is dropped in step 1 and therefore
87
- * counts as unset — such a key still comes from the manifest.
88
- *
89
- * Fail-loud: if the merged result has no `XRPL_SEED` and `allowOpenMode` is not
90
- * set, throws {@link OpenModeDeployError} rather than shipping a silent
91
- * credential-less app.
112
+ * edit across deploys. An empty `.env.local` value is dropped in step 1 and
113
+ * therefore counts as unset — such a key still comes from the manifest.
92
114
  *
93
- * @throws {OpenModeDeployError} when the resolved env is credential-less and
94
- * `allowOpenMode` is not set.
115
+ * @throws when `manifest.backend.env` sets one of {@link OWNER_ONLY_KEYS}. The
116
+ * message names the key, never its value.
95
117
  */
96
118
  function resolveRuntimeEnv(input) {
97
- const { env, manifestEnv = {}, allowOpenMode = false, warn } = input;
119
+ const { env, manifestEnv = {}, warn } = input;
120
+ // 0. The manifest may not carry the owner's key material. Refused before
121
+ // anything is merged; the value is not repeated, it may be a key.
122
+ for (const key of Object.keys(manifestEnv)) {
123
+ if (exports.OWNER_ONLY_KEYS.has((0, env_1.envKeyName)(key))) {
124
+ throw new Error(`manifest.backend.env sets "${key}": the owner's key material is never sent to a ` +
125
+ `deployed app. Remove it from the manifest.`);
126
+ }
127
+ }
98
128
  const merged = {};
99
- // 1. Forward every .env.local var except the denylist. Under an explicit
100
- // open-mode deploy, the owner key (XRPL_SEED) is ALSO withheld so the
101
- // deployed app ships zero-cred — the seed still exists locally for
102
- // attestation, it is just not injected into the container.
103
- const withhold = allowOpenMode
104
- ? new Set([...exports.NON_FORWARDED_KEYS, ...exports.CLUSTER_MODE_REQUIRED_KEYS])
105
- : exports.NON_FORWARDED_KEYS;
129
+ // 1. Forward every .env.local var except the denylist.
106
130
  for (const [key, val] of env) {
107
- if (withhold.has(key))
131
+ // Defence in depth: a key stored as `export XRPL_SEED` must not dodge the denylist.
132
+ if (exports.NON_FORWARDED_KEYS.has(key) || exports.NON_FORWARDED_KEYS.has((0, env_1.envKeyName)(key)))
108
133
  continue;
109
134
  if (val !== undefined && val !== '') {
110
135
  merged[key] = val;
@@ -130,13 +155,6 @@ function resolveRuntimeEnv(input) {
130
155
  }
131
156
  merged[key] = val;
132
157
  }
133
- // 3. Fail loud on a credential-less deploy unless opted in.
134
- if (!allowOpenMode) {
135
- const missing = exports.CLUSTER_MODE_REQUIRED_KEYS.filter((k) => merged[k] === undefined || merged[k] === '');
136
- if (missing.length > 0) {
137
- throw new OpenModeDeployError(missing);
138
- }
139
- }
140
158
  return merged;
141
159
  }
142
160
  //# sourceMappingURL=runtime-env.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"runtime-env.js","sourceRoot":"","sources":["../../src/_lib/runtime-env.ts"],"names":[],"mappings":";;;AA2JA,8CAuDC;AA9KD;;;;;GAKG;AACU,QAAA,kBAAkB,GAAwB,IAAI,GAAG,CAAC;IAC7D,6EAA6E;IAC7E,+EAA+E;IAC/E,gBAAgB;IAChB,eAAe;IACf,aAAa;IACb,kEAAkE;IAClE,UAAU;IACV,gBAAgB;IAChB,gGAAgG;IAChG,+EAA+E;IAC/E,6BAA6B;IAC7B,4FAA4F;IAC5F,kEAAkE;IAClE,8BAA8B;IAC9B,mEAAmE;IACnE,oCAAoC;CACrC,CAAC,CAAC;AAEH;;;;;;;;;GASG;AACU,QAAA,0BAA0B,GAAsB,CAAC,WAAW,CAAC,CAAC;AAyB3E;;;;GAIG;AACH,SAAS,kBAAkB,CAAC,GAAW;IACrC,OAAO,mEAAmE,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AACvF,CAAC;AAED;;;;;;GAMG;AACH,MAAa,mBAAoB,SAAQ,KAAK;IAC5C,YAAY,OAA0B;QACpC,KAAK,CACH,0EAA0E;YACxE,WAAW,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,2CAA2C;YACxE,kEAAkE;YAClE,kEAAkE;YAClE,iEAAiE;YACjE,oCAAoC,CACvC,CAAC;QACF,IAAI,CAAC,IAAI,GAAG,qBAAqB,CAAC;IACpC,CAAC;CACF;AAZD,kDAYC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,SAAgB,iBAAiB,CAAC,KAA6B;IAC7D,MAAM,EAAE,GAAG,EAAE,WAAW,GAAG,EAAE,EAAE,aAAa,GAAG,KAAK,EAAE,IAAI,EAAE,GAAG,KAAK,CAAC;IAErE,MAAM,MAAM,GAA2B,EAAE,CAAC;IAE1C,yEAAyE;IACzE,yEAAyE;IACzE,sEAAsE;IACtE,8DAA8D;IAC9D,MAAM,QAAQ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,OAAO,MAAM,CAAC;AAChB,CAAC"}
@@ -0,0 +1,16 @@
1
+ /** The environment as the shell gave it: what `process.env` held before dotenv ran. */
2
+ export declare function shellEnvironment(): Readonly<NodeJS.ProcessEnv>;
3
+ /**
4
+ * Drop an `HSUITE_SIGNER` that was not in the shell's environment. Call with the value read
5
+ * BEFORE dotenv ran; a value that appeared since is removed (or the shell's own is put back).
6
+ * Returns true when it dropped one.
7
+ */
8
+ export declare function dropFileProvidedSigner(beforeDotenv: string | undefined, processEnv?: NodeJS.ProcessEnv): boolean;
9
+ /**
10
+ * Load `.env` from the working directory, keeping the shell's environment apart from it.
11
+ *
12
+ * The ORDER is the guarantee: the snapshot is taken first, dotenv runs second, and an
13
+ * `HSUITE_SIGNER` that dotenv introduced is dropped third. Returns the snapshot.
14
+ */
15
+ export declare function loadDotenv(warn?: (message: string) => void): Readonly<NodeJS.ProcessEnv>;
16
+ //# sourceMappingURL=shell-env.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"shell-env.d.ts","sourceRoot":"","sources":["../../src/_lib/shell-env.ts"],"names":[],"mappings":"AAyBA,uFAAuF;AACvF,wBAAgB,gBAAgB,IAAI,QAAQ,CAAC,MAAM,CAAC,UAAU,CAAC,CAE9D;AAED;;;;GAIG;AACH,wBAAgB,sBAAsB,CACpC,YAAY,EAAE,MAAM,GAAG,SAAS,EAChC,UAAU,GAAE,MAAM,CAAC,UAAwB,GAC1C,OAAO,CAKT;AAED;;;;;GAKG;AACH,wBAAgB,UAAU,CACxB,IAAI,GAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAA0C,GACpE,QAAQ,CAAC,MAAM,CAAC,UAAU,CAAC,CAQ7B"}
@@ -0,0 +1,95 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
35
+ Object.defineProperty(exports, "__esModule", { value: true });
36
+ exports.shellEnvironment = shellEnvironment;
37
+ exports.dropFileProvidedSigner = dropFileProvidedSigner;
38
+ exports.loadDotenv = loadDotenv;
39
+ /**
40
+ * The environment the user's SHELL gave the CLI, kept apart from what `dotenv` adds to it.
41
+ *
42
+ * `dotenv.config()` copies a `.env` in the working directory into `process.env`. That file can
43
+ * come with a cloned repository, so nothing that decides WHAT PROGRAM RUNS, or how it runs, may be
44
+ * read from the merged environment:
45
+ *
46
+ * - `HSUITE_SIGNER` (the external signer program) must come from the shell. A value that only
47
+ * appeared after dotenv ran is dropped ({@link dropFileProvidedSigner}).
48
+ * - The external signer's own environment is built from the shell snapshot, never from
49
+ * `process.env`: a planted `NODE_OPTIONS`, `PYTHONPATH`, `BASH_ENV`, `LD_PRELOAD` or `DYLD_*`
50
+ * would otherwise run code inside the process that holds the key.
51
+ *
52
+ * {@link loadDotenv} is the CLI's one bootstrap step: snapshot, load, drop. `index.ts` calls it
53
+ * before any command runs.
54
+ */
55
+ const dotenv = __importStar(require("dotenv"));
56
+ /**
57
+ * The shell snapshot. Taken when this module is first loaded, which is before `index.ts` runs
58
+ * dotenv; {@link loadDotenv} replaces it with the copy it takes immediately before loading. That
59
+ * is its only write.
60
+ */
61
+ let shell = Object.freeze({ ...process.env });
62
+ /** The environment as the shell gave it: what `process.env` held before dotenv ran. */
63
+ function shellEnvironment() {
64
+ return shell;
65
+ }
66
+ /**
67
+ * Drop an `HSUITE_SIGNER` that was not in the shell's environment. Call with the value read
68
+ * BEFORE dotenv ran; a value that appeared since is removed (or the shell's own is put back).
69
+ * Returns true when it dropped one.
70
+ */
71
+ function dropFileProvidedSigner(beforeDotenv, processEnv = process.env) {
72
+ if (processEnv.HSUITE_SIGNER === beforeDotenv)
73
+ return false;
74
+ if (beforeDotenv === undefined)
75
+ delete processEnv.HSUITE_SIGNER;
76
+ else
77
+ processEnv.HSUITE_SIGNER = beforeDotenv;
78
+ return true;
79
+ }
80
+ /**
81
+ * Load `.env` from the working directory, keeping the shell's environment apart from it.
82
+ *
83
+ * The ORDER is the guarantee: the snapshot is taken first, dotenv runs second, and an
84
+ * `HSUITE_SIGNER` that dotenv introduced is dropped third. Returns the snapshot.
85
+ */
86
+ function loadDotenv(warn = (message) => console.error(message)) {
87
+ const before = Object.freeze({ ...process.env });
88
+ dotenv.config();
89
+ if (dropFileProvidedSigner(before.HSUITE_SIGNER)) {
90
+ warn('hsuite: ignoring HSUITE_SIGNER from .env — it is read from the shell environment only');
91
+ }
92
+ shell = before;
93
+ return before;
94
+ }
95
+ //# sourceMappingURL=shell-env.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"shell-env.js","sourceRoot":"","sources":["../../src/_lib/shell-env.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA0BA,4CAEC;AAOD,wDAQC;AAQD,gCAUC;AA7DD;;;;;;;;;;;;;;;GAeG;AACH,+CAAiC;AAEjC;;;;GAIG;AACH,IAAI,KAAK,GAAgC,MAAM,CAAC,MAAM,CAAC,EAAE,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC,CAAC;AAE3E,uFAAuF;AACvF,SAAgB,gBAAgB;IAC9B,OAAO,KAAK,CAAC;AACf,CAAC;AAED;;;;GAIG;AACH,SAAgB,sBAAsB,CACpC,YAAgC,EAChC,aAAgC,OAAO,CAAC,GAAG;IAE3C,IAAI,UAAU,CAAC,aAAa,KAAK,YAAY;QAAE,OAAO,KAAK,CAAC;IAC5D,IAAI,YAAY,KAAK,SAAS;QAAE,OAAO,UAAU,CAAC,aAAa,CAAC;;QAC3D,UAAU,CAAC,aAAa,GAAG,YAAY,CAAC;IAC7C,OAAO,IAAI,CAAC;AACd,CAAC;AAED;;;;;GAKG;AACH,SAAgB,UAAU,CACxB,OAAkC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC;IAErE,MAAM,MAAM,GAAgC,MAAM,CAAC,MAAM,CAAC,EAAE,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC,CAAC;IAC9E,MAAM,CAAC,MAAM,EAAE,CAAC;IAChB,IAAI,sBAAsB,CAAC,MAAM,CAAC,aAAa,CAAC,EAAE,CAAC;QACjD,IAAI,CAAC,uFAAuF,CAAC,CAAC;IAChG,CAAC;IACD,KAAK,GAAG,MAAM,CAAC;IACf,OAAO,MAAM,CAAC;AAChB,CAAC"}
@@ -31,6 +31,7 @@
31
31
  */
32
32
  import { type SubscriptionOrder } from '@hsuite/smart-engines-sdk';
33
33
  export type { SubscriptionOrder } from '@hsuite/smart-engines-sdk';
34
+ import type { OwnerSigner } from './owner-signer';
34
35
  export type DepositInstructions = {
35
36
  walletAddress: string;
36
37
  tokenId: string;
@@ -394,15 +395,17 @@ export type SubscriptionClientOptions = {
394
395
  * short on a slow public XRPL endpoint). */
395
396
  requestTimeoutMs?: number;
396
397
  /**
397
- * Optional web3-auth creds. When set, `authenticate()` obtains a validator
398
+ * Optional web3-auth identity. When set, `authenticate()` obtains a validator
398
399
  * bearer session (the subscription routes are session-guarded since P4d, so
399
- * `request`/`mint` 401 without it).
400
+ * `request`/`mint` 401 without it). `signer` is the owner signer, resolved
401
+ * lazily: nothing is derived, and no external signer runs, until a login.
400
402
  */
401
- auth?: {
402
- chain: string;
403
- address: string;
404
- seed: string;
405
- };
403
+ auth?: SubscriptionAuth;
404
+ };
405
+ /** The identity `SubscriptionClient.authenticate()` logs in as. */
406
+ export type SubscriptionAuth = {
407
+ chain: string;
408
+ signer: () => Promise<Pick<OwnerSigner, 'walletAddress' | 'publicKey' | 'signFn'>>;
406
409
  };
407
410
  /**
408
411
  * Validator-side subscription HTTP client.
@@ -426,8 +429,8 @@ export declare class SubscriptionClient {
426
429
  * (`/auth/validator/...`). Call before request/mint; no-op without creds.
427
430
  *
428
431
  * Delegates to the SDK's {@link ValidatorAuthClient} for the
429
- * challenge/authenticate round-trip; signing stays here (ripple-keypairs)
430
- * because it owns the dev wallet seed. The resulting bearer is attached to
432
+ * challenge/authenticate round-trip; signing goes through the owner signer
433
+ * (`./owner-signer`), for the `login` purpose. The resulting bearer is attached to
431
434
  * the shared HTTP client via `setAuthToken`, so subsequent SDK calls carry it.
432
435
  */
433
436
  authenticate(): Promise<void>;
@@ -1 +1 @@
1
- {"version":3,"file":"subscription-client.d.ts","sourceRoot":"","sources":["../../src/_lib/subscription-client.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,OAAO,EAML,KAAK,iBAAiB,EACvB,MAAM,2BAA2B,CAAC;AAEnC,YAAY,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAInE,MAAM,MAAM,mBAAmB,GAAG;IAChC,aAAa,EAAE,MAAM,CAAC;IACtB,OAAO,EAAE,MAAM,CAAC;IAChB,sEAAsE;IACtE,MAAM,EAAE,MAAM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AE9E,wIAAwI;AACxI,wBAAgB,8BAA8B,CAAC,GAAG,EAAE,OAAO,GAAG,OAAO,CAGpE;AAED;;;GAGG;AACH,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,MAAM,GAAG,0BAA0B,CAEhF"}
@@ -36,7 +36,6 @@ exports.notYetReplicatedStatus = notYetReplicatedStatus;
36
36
  */
37
37
  const smart_engines_sdk_1 = require("@hsuite/smart-engines-sdk");
38
38
  const transport_1 = require("./transport");
39
- const xrpl_login_signer_1 = require("./xrpl-login-signer");
40
39
  /**
41
40
  * Validator-side subscription HTTP client.
42
41
  *
@@ -86,21 +85,20 @@ class SubscriptionClient {
86
85
  * (`/auth/validator/...`). Call before request/mint; no-op without creds.
87
86
  *
88
87
  * Delegates to the SDK's {@link ValidatorAuthClient} for the
89
- * challenge/authenticate round-trip; signing stays here (ripple-keypairs)
90
- * because it owns the dev wallet seed. The resulting bearer is attached to
88
+ * challenge/authenticate round-trip; signing goes through the owner signer
89
+ * (`./owner-signer`), for the `login` purpose. The resulting bearer is attached to
91
90
  * the shared HTTP client via `setAuthToken`, so subsequent SDK calls carry it.
92
91
  */
93
92
  async authenticate() {
94
93
  if (!this.auth)
95
94
  return;
96
- // #3506 A3 MEDIUM-1 — the SAME signer `signEntityCreateIntent` uses,
97
- // built the SAME way (deriveKeypair(seed) + the caller's own address),
95
+ // #3506 A3 MEDIUM-1 — the SAME owner signer `signEntityCreateIntent` uses,
98
96
  // so the login identity and the intent-signing identity can never drift.
99
- const signer = await (0, xrpl_login_signer_1.buildXrplLoginSigner)(this.auth.address, this.auth.seed);
97
+ const signer = await this.auth.signer();
100
98
  const authClient = new smart_engines_sdk_1.ValidatorAuthClient({
101
99
  security: { allowInsecure: (0, transport_1.resolveAllowInsecure)(this.origin) },
102
100
  });
103
- const res = await authClient.authenticateWithSigner(this.origin, this.auth.chain, signer.address, signer.publicKey, (challenge) => signer.signFn(challenge));
101
+ const res = await authClient.authenticateWithSigner(this.origin, this.auth.chain, signer.walletAddress, signer.publicKey, (challenge) => signer.signFn(challenge, 'login'));
104
102
  if (!res.token)
105
103
  throw new Error('validator auth: no session token returned');
106
104
  this.http.setAuthToken(res.token);