@hsuite/smart-engines-cli 3.3.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.
- package/README.md +122 -37
- package/dist/_lib/attestation.d.ts +14 -5
- package/dist/_lib/attestation.d.ts.map +1 -1
- package/dist/_lib/attestation.js +27 -7
- package/dist/_lib/attestation.js.map +1 -1
- package/dist/_lib/baas.d.ts +5 -2
- package/dist/_lib/baas.d.ts.map +1 -1
- package/dist/_lib/baas.js +4 -9
- package/dist/_lib/baas.js.map +1 -1
- package/dist/_lib/cluster-convergence.d.ts +1 -1
- package/dist/_lib/cluster-convergence.d.ts.map +1 -1
- package/dist/_lib/env.d.ts +2 -7
- package/dist/_lib/env.d.ts.map +1 -1
- package/dist/_lib/env.js +7 -30
- package/dist/_lib/env.js.map +1 -1
- package/dist/_lib/owner-signer.d.ts +110 -0
- package/dist/_lib/owner-signer.d.ts.map +1 -0
- package/dist/_lib/owner-signer.js +477 -0
- package/dist/_lib/owner-signer.js.map +1 -0
- package/dist/_lib/runtime-env.d.ts +36 -58
- package/dist/_lib/runtime-env.d.ts.map +1 -1
- package/dist/_lib/runtime-env.js +80 -62
- package/dist/_lib/runtime-env.js.map +1 -1
- package/dist/_lib/shell-env.d.ts +16 -0
- package/dist/_lib/shell-env.d.ts.map +1 -0
- package/dist/_lib/shell-env.js +95 -0
- package/dist/_lib/shell-env.js.map +1 -0
- package/dist/_lib/subscription-client.d.ts +12 -9
- package/dist/_lib/subscription-client.d.ts.map +1 -1
- package/dist/_lib/subscription-client.js +5 -7
- package/dist/_lib/subscription-client.js.map +1 -1
- package/dist/_lib/subscription-env.d.ts +1 -5
- package/dist/_lib/subscription-env.d.ts.map +1 -1
- package/dist/_lib/subscription-env.js +0 -9
- package/dist/_lib/subscription-env.js.map +1 -1
- package/dist/commands/app-lifecycle.d.ts.map +1 -1
- package/dist/commands/app-lifecycle.js +8 -6
- package/dist/commands/app-lifecycle.js.map +1 -1
- package/dist/commands/ci.d.ts.map +1 -1
- package/dist/commands/ci.js +19 -17
- package/dist/commands/ci.js.map +1 -1
- package/dist/commands/customer-scope.d.ts +5 -2
- package/dist/commands/customer-scope.d.ts.map +1 -1
- package/dist/commands/customer-scope.js +12 -13
- package/dist/commands/customer-scope.js.map +1 -1
- package/dist/commands/deploy.d.ts +0 -7
- package/dist/commands/deploy.d.ts.map +1 -1
- package/dist/commands/deploy.js +26 -33
- package/dist/commands/deploy.js.map +1 -1
- package/dist/commands/faucet.d.ts +12 -10
- package/dist/commands/faucet.d.ts.map +1 -1
- package/dist/commands/faucet.js +14 -23
- package/dist/commands/faucet.js.map +1 -1
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +10 -2
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/redeploy.d.ts +0 -6
- package/dist/commands/redeploy.d.ts.map +1 -1
- package/dist/commands/redeploy.js +21 -22
- package/dist/commands/redeploy.js.map +1 -1
- package/dist/commands/renew.d.ts +2 -1
- package/dist/commands/renew.d.ts.map +1 -1
- package/dist/commands/renew.js +15 -10
- package/dist/commands/renew.js.map +1 -1
- package/dist/commands/status.d.ts.map +1 -1
- package/dist/commands/status.js +2 -1
- package/dist/commands/status.js.map +1 -1
- package/dist/commands/subscribe.d.ts +8 -9
- package/dist/commands/subscribe.d.ts.map +1 -1
- package/dist/commands/subscribe.js +25 -27
- package/dist/commands/subscribe.js.map +1 -1
- package/dist/commands/topup.d.ts +2 -1
- package/dist/commands/topup.d.ts.map +1 -1
- package/dist/commands/topup.js +9 -7
- package/dist/commands/topup.js.map +1 -1
- package/dist/commands/update.d.ts +3 -3
- package/dist/commands/update.d.ts.map +1 -1
- package/dist/commands/update.js +12 -5
- package/dist/commands/update.js.map +1 -1
- package/dist/index.js +5 -2
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -189,41 +189,127 @@ The manifest has ONE shape: a required `backend` block plus an optional
|
|
|
189
189
|
|
|
190
190
|
#### Runtime env: auto-forwarded from `.env.local` (do NOT hand-copy secrets)
|
|
191
191
|
|
|
192
|
-
`hsuite deploy` **automatically forwards your `.env.local` runtime
|
|
193
|
-
deployed container
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
`packages/hsuite-cli/src/_lib/runtime-env.ts`
|
|
208
|
-
|
|
209
|
-
`
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
**
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
192
|
+
`hsuite deploy` **automatically forwards your `.env.local` runtime config into the
|
|
193
|
+
deployed container**, so the deployed app runs with the same config it runs with
|
|
194
|
+
locally. You never hand-copy app config into a committed manifest (issue #1564).
|
|
195
|
+
|
|
196
|
+
**Your owner key never goes into the container.** `XRPL_SEED`, `XRPL_PRIVATE_KEY`
|
|
197
|
+
and `HSUITE_SIGNER` stay on your machine: they are never forwarded from
|
|
198
|
+
`.env.local`, a manifest whose `backend.env` sets one of them is refused, and
|
|
199
|
+
`hsuite update --env-set` refuses them too. The deployed app's backend
|
|
200
|
+
authenticates to the BaaS host with the app token the platform mints for it
|
|
201
|
+
(`APP_TOKEN` / `APP_TOKEN_FILE`, injected into the container), for data-plane
|
|
202
|
+
access only. Owner operations (deploy, suspend, resume, delete, credentials,
|
|
203
|
+
entity and agent creation) are yours to run from this CLI, not from inside the
|
|
204
|
+
container.
|
|
205
|
+
|
|
206
|
+
**What gets forwarded:** every key in your `.env.local` except a short denylist
|
|
207
|
+
(`NON_FORWARDED_KEYS` in `packages/hsuite-cli/src/_lib/runtime-env.ts`): the
|
|
208
|
+
owner keys above, the platform-resolved connection URLs (`SMART_HOST_URL` /
|
|
209
|
+
`VALIDATOR_URL` / `GATEWAY_URL`, which the platform injects in-cluster), the
|
|
210
|
+
local-only toggles (`DEV_MODE` / `ALLOW_INSECURE`) and the CLI's own
|
|
211
|
+
`SUBSCRIPTION_PENDING_*` markers.
|
|
212
|
+
|
|
213
|
+
**Precedence:** a non-empty `.env.local` value wins over `manifest.backend.env`
|
|
214
|
+
for the same key, and the collision is warned (#2902). Use `backend.env` for
|
|
215
|
+
explicit **non-secret** per-deploy overrides (ports, feature flags) that have no
|
|
216
|
+
local value. Everything lands in the app's **PQC-encrypted (kyber-aes-v1)
|
|
217
|
+
per-app customer-env Secret** — the pod's runtime env, `envFrom`-mounted on the
|
|
218
|
+
backend container.
|
|
219
|
+
|
|
220
|
+
**The runtime env is replaced, not patched.** Each deploy and redeploy sends the
|
|
221
|
+
whole map, and the platform replaces the stored one with it. An app deployed by
|
|
222
|
+
an older CLI may have received `XRPL_SEED` in its runtime env. A redeploy
|
|
223
|
+
(`hsuite redeploy --manifest <file>`) drops the stored copy but does not undo the
|
|
224
|
+
exposure: the app's code and anyone who could exec into the container could read
|
|
225
|
+
it. Treat that seed as compromised and rotate it. `deploy` and
|
|
226
|
+
`redeploy` print a one-line reminder of this.
|
|
227
|
+
|
|
228
|
+
> The same forwarding applies to `hsuite redeploy`.
|
|
229
|
+
|
|
230
|
+
#### Signing without a family seed
|
|
231
|
+
|
|
232
|
+
Every authenticated command signs as the app owner. The key can come from one of
|
|
233
|
+
three sources. Configure exactly one. The CLI refuses two.
|
|
234
|
+
|
|
235
|
+
| Source | Where | Signs |
|
|
236
|
+
| --- | --- | --- |
|
|
237
|
+
| `XRPL_SEED` | env file | messages and XRPL transactions |
|
|
238
|
+
| `XRPL_PRIVATE_KEY` | env file | messages and XRPL transactions |
|
|
239
|
+
| `HSUITE_SIGNER` | your shell's environment | messages only |
|
|
240
|
+
|
|
241
|
+
`XRPL_ADDRESS` is required with each of them.
|
|
242
|
+
|
|
243
|
+
**Raw private key.** An account made from a recovery phrase (a BIP-44 key, as in
|
|
244
|
+
HSuite Wallet) has no family seed. Put its key in the env file instead of
|
|
245
|
+
`XRPL_SEED`:
|
|
246
|
+
|
|
247
|
+
```sh
|
|
248
|
+
XRPL_ADDRESS=r...
|
|
249
|
+
XRPL_PRIVATE_KEY=00... # 00 + 64 hex (secp256k1), or ED + 64 hex (ed25519)
|
|
250
|
+
```
|
|
251
|
+
|
|
252
|
+
The key must be the account's master key. A key that belongs to another account
|
|
253
|
+
is refused.
|
|
254
|
+
|
|
255
|
+
**External signer.** The key never enters the CLI. Export the absolute path of a
|
|
256
|
+
program in your shell, and keep the account in the env file:
|
|
257
|
+
|
|
258
|
+
```sh
|
|
259
|
+
export HSUITE_SIGNER=/usr/local/bin/hsuite-signer # shell only, never in a file
|
|
260
|
+
# .env.local
|
|
261
|
+
XRPL_ADDRESS=r...
|
|
262
|
+
XRPL_PUBLIC_KEY=ED...
|
|
263
|
+
```
|
|
264
|
+
|
|
265
|
+
The contract:
|
|
266
|
+
|
|
267
|
+
- The CLI runs the program with one argument, the purpose: `login`, `attestation`,
|
|
268
|
+
`retire` or `intent`. There is no shell.
|
|
269
|
+
- The message arrives on stdin, as UTF-8.
|
|
270
|
+
- The program prints one hex signature to stdout and exits `0`. The signature is
|
|
271
|
+
`ripple-keypairs.sign(upperHex(utf8(message)), privateKey)`.
|
|
272
|
+
- The program gets a short list of variables from your shell: `PATH`, `HOME`,
|
|
273
|
+
`USER`, `LOGNAME`, `SHELL`, `LANG`, `LC_*`, `TZ`, `TERM`, `TMPDIR`,
|
|
274
|
+
`SSH_AUTH_SOCK`, `GPG_AGENT_INFO`, `GPG_TTY`, `XDG_RUNTIME_DIR`, `DISPLAY`,
|
|
275
|
+
`WAYLAND_DISPLAY` and your own `HSUITE_SIGNER_*` settings. It gets nothing
|
|
276
|
+
else: no `XRPL_SEED`, no `XRPL_PRIVATE_KEY`, no `NODE_OPTIONS`, and nothing a
|
|
277
|
+
`.env` file set.
|
|
278
|
+
- The program runs in your home directory, not in the project.
|
|
279
|
+
- The CLI prints the purpose and the message before it runs the program. Control
|
|
280
|
+
characters are removed from what it prints.
|
|
281
|
+
- The CLI verifies the signature against `XRPL_PUBLIC_KEY` before it uses it.
|
|
282
|
+
- A message of exactly 64 hex characters is the shape of a build attestation.
|
|
283
|
+
The CLI signs it only for the `attestation` purpose, with every source.
|
|
284
|
+
|
|
285
|
+
`HSUITE_SIGNER` is read from the process environment only. It is refused in the
|
|
286
|
+
`--env` file and ignored in a `.env` in the working directory, so a cloned
|
|
287
|
+
repository cannot name a program to run.
|
|
288
|
+
|
|
289
|
+
```js
|
|
290
|
+
#!/usr/bin/env node
|
|
291
|
+
// hsuite-signer: prints a ripple-keypairs signature of the message on stdin.
|
|
292
|
+
const { sign } = require('ripple-keypairs');
|
|
293
|
+
const { execFileSync } = require('child_process');
|
|
294
|
+
const purpose = process.argv[2]; // login | attestation | retire | intent
|
|
295
|
+
const message = require('fs').readFileSync(0, 'utf8'); // the text the CLI showed you
|
|
296
|
+
if (purpose === 'retire') process.exit(1); // your policy: refuse what you never sign
|
|
297
|
+
// Fetch the key from your own store. This line reads the macOS keychain.
|
|
298
|
+
const key = execFileSync('security', ['find-generic-password', '-s', 'hsuite-owner', '-w'], { encoding: 'utf8' }).trim();
|
|
299
|
+
process.stdout.write(sign(Buffer.from(message, 'utf8').toString('hex').toUpperCase(), key));
|
|
300
|
+
```
|
|
301
|
+
|
|
302
|
+
**What an external signer cannot do.** It signs messages, not XRPL transactions.
|
|
303
|
+
`hsuite subscribe` (deposit, NFT accept), `hsuite topup`, `hsuite renew --pay-with`
|
|
304
|
+
and the `hsuite faucet` trustline stop with a clear message. Sign those in your
|
|
305
|
+
wallet (`--no-autopay` prints the instructions), or use `XRPL_PRIVATE_KEY`.
|
|
306
|
+
|
|
307
|
+
**Deploying.** No owner key is forwarded into the deployed container, whichever
|
|
308
|
+
source you use. The deployed app's backend authenticates with its app token.
|
|
309
|
+
|
|
310
|
+
**RegularKey.** A RegularKey passes sign-in but not the build attestation. The
|
|
311
|
+
attestation must be signed by the account's master key. The CLI checks this
|
|
312
|
+
locally and stops before it sends anything.
|
|
227
313
|
|
|
228
314
|
Backend-only example (no `frontend` block — the edge proxies all paths to the
|
|
229
315
|
backend):
|
|
@@ -348,8 +434,7 @@ Flags: `--manifest <file>`, `--env <file>` (default `.env.local`), `--project
|
|
|
348
434
|
<dir>` (SDK/framework detection root), `--gateway <url>`, `--subscription-app-id
|
|
349
435
|
<id>`, `--strategy rolling|recreate`, `--docker-host <host>` (defaults to
|
|
350
436
|
`$DOCKER_HOST`), `--skip-build`, `--skip-push`, `--skip-distribute`,
|
|
351
|
-
`--
|
|
352
|
-
OFF — a subscribed-but-credential-less deploy fails loud), `--non-interactive`.
|
|
437
|
+
`--non-interactive`.
|
|
353
438
|
|
|
354
439
|
The docker login uses the init-issued one-time robot creds via
|
|
355
440
|
`execFileSync('docker', ['login', server, '-u', username, '--password-stdin'])`
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { type BuildAttestation } from '@hsuite/smart-engines-sdk';
|
|
2
2
|
import type { Framework } from './framework';
|
|
3
|
+
import { type OwnerSigner } from './owner-signer';
|
|
3
4
|
/** Everything needed to assemble an attestation, minus `version`/`builtAt`. */
|
|
4
5
|
export type AttestationInputs = {
|
|
5
6
|
appId: string;
|
|
@@ -35,11 +36,19 @@ export declare function readCliVersion(): string;
|
|
|
35
36
|
*/
|
|
36
37
|
export declare function assembleAttestation(inputs: AttestationInputs): BuildAttestation;
|
|
37
38
|
/**
|
|
38
|
-
* Assemble + sign in one step with the
|
|
39
|
-
* `{ payload, signature }` envelope the deploy request
|
|
39
|
+
* Assemble + sign in one step with the owner's signer (seed, raw key or external
|
|
40
|
+
* signer), returning the `{ payload, signature }` envelope the deploy request
|
|
41
|
+
* carries. The signer is asked to sign for the `attestation` purpose.
|
|
40
42
|
*
|
|
41
|
-
* Delegates
|
|
42
|
-
*
|
|
43
|
+
* Delegates to the SDK primitive, so the bytes the server verifies are produced
|
|
44
|
+
* by the canonical code path, and the result is verified against
|
|
45
|
+
* `developerWallet` before it is returned: a key that is not that account's
|
|
46
|
+
* master key fails here, not as a rejected deploy.
|
|
47
|
+
*
|
|
48
|
+
* What is signed is a hash, and a hash says nothing to whoever approves it. So
|
|
49
|
+
* the fields the hash commits to are printed (to `notice`, stderr by default)
|
|
50
|
+
* BEFORE the signer is asked: the owner, and an external signer's operator, see
|
|
51
|
+
* which app, which image and which bundle the signature is for.
|
|
43
52
|
*/
|
|
44
|
-
export declare function assembleAndSign(inputs: AttestationInputs,
|
|
53
|
+
export declare function assembleAndSign(inputs: AttestationInputs, signer: Pick<OwnerSigner, 'publicKey' | 'signFn'>, notice?: (text: string) => void): Promise<SignedAttestation>;
|
|
45
54
|
//# sourceMappingURL=attestation.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"attestation.d.ts","sourceRoot":"","sources":["../../src/_lib/attestation.ts"],"names":[],"mappings":"AAmBA,OAAO,
|
|
1
|
+
{"version":3,"file":"attestation.d.ts","sourceRoot":"","sources":["../../src/_lib/attestation.ts"],"names":[],"mappings":"AAmBA,OAAO,EAAE,KAAK,gBAAgB,EAAuB,MAAM,2BAA2B,CAAC;AACvF,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,EAA8B,KAAK,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE9E,+EAA+E;AAC/E,MAAM,MAAM,iBAAiB,GAAG;IAC9B,KAAK,EAAE,MAAM,CAAC;IACd,eAAe,EAAE,MAAM,CAAC;IACxB,cAAc,EAAE,gBAAgB,CAAC,gBAAgB,CAAC,CAAC;IACnD,SAAS,EAAE,SAAS,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,qDAAqD;IACrD,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,0EAA0E;IAC1E,GAAG,CAAC,EAAE,MAAM,MAAM,CAAC;CACpB,CAAC;AAEF,mFAAmF;AACnF,MAAM,MAAM,iBAAiB,GAAG;IAC9B,OAAO,EAAE,gBAAgB,CAAC;IAC1B,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF;;;;;GAKG;AACH,wBAAgB,cAAc,IAAI,MAAM,CAQvC;AAED;;;;;;GAMG;AACH,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,iBAAiB,GAAG,gBAAgB,CAc/E;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAsB,eAAe,CACnC,MAAM,EAAE,iBAAiB,EACzB,MAAM,EAAE,IAAI,CAAC,WAAW,EAAE,WAAW,GAAG,QAAQ,CAAC,EACjD,MAAM,GAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAoB,GAC7C,OAAO,CAAC,iBAAiB,CAAC,CAiB5B"}
|
package/dist/_lib/attestation.js
CHANGED
|
@@ -6,7 +6,7 @@ exports.assembleAndSign = assembleAndSign;
|
|
|
6
6
|
/**
|
|
7
7
|
* CLI-side assembly of a {@link BuildAttestation}.
|
|
8
8
|
*
|
|
9
|
-
* The cryptographic primitive (`
|
|
9
|
+
* The cryptographic primitive (`signAttestationWith`, the `BuildAttestation` type,
|
|
10
10
|
* the canonicalizer) lives in `@hsuite/smart-engines-sdk` and is FROZEN — this
|
|
11
11
|
* module only imports it. The SDK primitive is deliberately clock-free and
|
|
12
12
|
* pure; the one impure input, `builtAt`, is supplied HERE (the CLI is allowed
|
|
@@ -23,6 +23,7 @@ exports.assembleAndSign = assembleAndSign;
|
|
|
23
23
|
const fs_1 = require("fs");
|
|
24
24
|
const path_1 = require("path");
|
|
25
25
|
const smart_engines_sdk_1 = require("@hsuite/smart-engines-sdk");
|
|
26
|
+
const owner_signer_1 = require("./owner-signer");
|
|
26
27
|
/**
|
|
27
28
|
* Read this CLI's own version from its `package.json`, for `cliVersion`.
|
|
28
29
|
*
|
|
@@ -62,15 +63,34 @@ function assembleAttestation(inputs) {
|
|
|
62
63
|
};
|
|
63
64
|
}
|
|
64
65
|
/**
|
|
65
|
-
* Assemble + sign in one step with the
|
|
66
|
-
* `{ payload, signature }` envelope the deploy request
|
|
66
|
+
* Assemble + sign in one step with the owner's signer (seed, raw key or external
|
|
67
|
+
* signer), returning the `{ payload, signature }` envelope the deploy request
|
|
68
|
+
* carries. The signer is asked to sign for the `attestation` purpose.
|
|
67
69
|
*
|
|
68
|
-
* Delegates
|
|
69
|
-
*
|
|
70
|
+
* Delegates to the SDK primitive, so the bytes the server verifies are produced
|
|
71
|
+
* by the canonical code path, and the result is verified against
|
|
72
|
+
* `developerWallet` before it is returned: a key that is not that account's
|
|
73
|
+
* master key fails here, not as a rejected deploy.
|
|
74
|
+
*
|
|
75
|
+
* What is signed is a hash, and a hash says nothing to whoever approves it. So
|
|
76
|
+
* the fields the hash commits to are printed (to `notice`, stderr by default)
|
|
77
|
+
* BEFORE the signer is asked: the owner, and an external signer's operator, see
|
|
78
|
+
* which app, which image and which bundle the signature is for.
|
|
70
79
|
*/
|
|
71
|
-
function assembleAndSign(inputs,
|
|
80
|
+
async function assembleAndSign(inputs, signer, notice = owner_signer_1.defaultNotice) {
|
|
72
81
|
const payload = assembleAttestation(inputs);
|
|
73
|
-
|
|
82
|
+
notice((0, owner_signer_1.noticeBlock)('signing the build attestation for', [
|
|
83
|
+
['appId', payload.appId],
|
|
84
|
+
['developerWallet', payload.developerWallet],
|
|
85
|
+
['imageDigest', payload.imageDigest],
|
|
86
|
+
['bundleSha256', payload.bundleSha256 === '' ? '(none: backend-only app)' : payload.bundleSha256],
|
|
87
|
+
['framework', payload.framework],
|
|
88
|
+
['cliVersion', payload.cliVersion],
|
|
89
|
+
]));
|
|
90
|
+
const signature = await (0, smart_engines_sdk_1.signAttestationWith)(payload, {
|
|
91
|
+
publicKey: signer.publicKey,
|
|
92
|
+
signFn: (message) => signer.signFn(message, 'attestation'),
|
|
93
|
+
});
|
|
74
94
|
return { payload, signature };
|
|
75
95
|
}
|
|
76
96
|
//# sourceMappingURL=attestation.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"attestation.js","sourceRoot":"","sources":["../../src/_lib/attestation.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"attestation.js","sourceRoot":"","sources":["../../src/_lib/attestation.ts"],"names":[],"mappings":";;AAkDA,wCAQC;AASD,kDAcC;AAiBD,0CAqBC;AAvHD;;;;;;;;;;;;;;;;GAgBG;AACH,2BAAkC;AAClC,+BAA4B;AAC5B,iEAAuF;AAEvF,iDAA8E;AAuB9E;;;;;GAKG;AACH,SAAgB,cAAc;IAC5B,IAAI,CAAC;QACH,MAAM,OAAO,GAAG,IAAA,WAAI,EAAC,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,cAAc,CAAC,CAAC;QAC5D,MAAM,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,IAAA,iBAAY,EAAC,OAAO,EAAE,MAAM,CAAC,CAAyB,CAAC;QAC9E,OAAO,GAAG,CAAC,OAAO,IAAI,OAAO,CAAC;IAChC,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,OAAO,CAAC;IACjB,CAAC;AACH,CAAC;AAED;;;;;;GAMG;AACH,SAAgB,mBAAmB,CAAC,MAAyB;IAC3D,MAAM,GAAG,GAAG,MAAM,CAAC,GAAG,IAAI,IAAI,CAAC,GAAG,CAAC;IACnC,OAAO;QACL,OAAO,EAAE,GAAG;QACZ,KAAK,EAAE,MAAM,CAAC,KAAK;QACnB,eAAe,EAAE,MAAM,CAAC,eAAe;QACvC,cAAc,EAAE,MAAM,CAAC,cAAc;QACrC,SAAS,EAAE,MAAM,CAAC,SAAS;QAC3B,UAAU,EAAE,MAAM,CAAC,UAAU;QAC7B,WAAW,EAAE,MAAM,CAAC,WAAW;QAC/B,YAAY,EAAE,MAAM,CAAC,YAAY;QACjC,UAAU,EAAE,MAAM,CAAC,UAAU;QAC7B,OAAO,EAAE,GAAG,EAAE;KACf,CAAC;AACJ,CAAC;AAED;;;;;;;;;;;;;;GAcG;AACI,KAAK,UAAU,eAAe,CACnC,MAAyB,EACzB,MAAiD,EACjD,SAAiC,4BAAa;IAE9C,MAAM,OAAO,GAAG,mBAAmB,CAAC,MAAM,CAAC,CAAC;IAC5C,MAAM,CACJ,IAAA,0BAAW,EAAC,mCAAmC,EAAE;QAC/C,CAAC,OAAO,EAAE,OAAO,CAAC,KAAK,CAAC;QACxB,CAAC,iBAAiB,EAAE,OAAO,CAAC,eAAe,CAAC;QAC5C,CAAC,aAAa,EAAE,OAAO,CAAC,WAAW,CAAC;QACpC,CAAC,cAAc,EAAE,OAAO,CAAC,YAAY,KAAK,EAAE,CAAC,CAAC,CAAC,0BAA0B,CAAC,CAAC,CAAC,OAAO,CAAC,YAAY,CAAC;QACjG,CAAC,WAAW,EAAE,OAAO,CAAC,SAAS,CAAC;QAChC,CAAC,YAAY,EAAE,OAAO,CAAC,UAAU,CAAC;KACnC,CAAC,CACH,CAAC;IACF,MAAM,SAAS,GAAG,MAAM,IAAA,uCAAmB,EAAC,OAAO,EAAE;QACnD,SAAS,EAAE,MAAM,CAAC,SAAS;QAC3B,MAAM,EAAE,CAAC,OAAO,EAAE,EAAE,CAAC,MAAM,CAAC,MAAM,CAAC,OAAO,EAAE,aAAa,CAAC;KAC3D,CAAC,CAAC;IACH,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,CAAC;AAChC,CAAC"}
|
package/dist/_lib/baas.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { BaasClient } from '@hsuite/smart-engines-sdk';
|
|
2
2
|
import type { EnvMap } from './env';
|
|
3
|
+
import { type OwnerSigner } from './owner-signer';
|
|
3
4
|
import type { RunFn } from './run-fn';
|
|
4
5
|
/** Default per-app deploy timeout — `init` runs the smart-app entity DKG ceremony. */
|
|
5
6
|
export declare const DEFAULT_DEPLOY_TIMEOUT_MS = 240000;
|
|
@@ -27,8 +28,10 @@ export type { RunFn } from './run-fn';
|
|
|
27
28
|
export type ConnectAndAuthOpts = {
|
|
28
29
|
/** Public gateway/host URL. */
|
|
29
30
|
gateway: string;
|
|
30
|
-
/** Parsed env (
|
|
31
|
+
/** Parsed env (the owner signer is resolved from it, unless `signer` is given). */
|
|
31
32
|
env: EnvMap;
|
|
33
|
+
/** An already-resolved owner signer, so a command resolves it once. */
|
|
34
|
+
signer?: OwnerSigner;
|
|
32
35
|
/** Existing appId to bind the client to. Falls back to `'pending'`. */
|
|
33
36
|
appId?: string;
|
|
34
37
|
/** Request timeout (ms). Defaults to {@link DEFAULT_DEPLOY_TIMEOUT_MS}. */
|
|
@@ -46,7 +49,7 @@ export type ConnectAndAuthOpts = {
|
|
|
46
49
|
}) => BaasClient;
|
|
47
50
|
};
|
|
48
51
|
/**
|
|
49
|
-
* Construct the ONE {@link BaasClient} and authenticate it with the
|
|
52
|
+
* Construct the ONE {@link BaasClient} and authenticate it with the owner
|
|
50
53
|
* signer. Returns the authenticated client. Throws on a missing signer or an
|
|
51
54
|
* auth failure (the command-level action renders + exits).
|
|
52
55
|
*/
|
package/dist/_lib/baas.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"baas.d.ts","sourceRoot":"","sources":["../../src/_lib/baas.ts"],"names":[],"mappings":"AA+CA,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AACvD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"baas.d.ts","sourceRoot":"","sources":["../../src/_lib/baas.ts"],"names":[],"mappings":"AA+CA,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AACvD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AACpC,OAAO,EAAkC,KAAK,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAElF,OAAO,KAAK,EAAE,KAAK,E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AM,CAAC;IACf,iFAAiF;IACjF,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,sEAAsE;IACtE,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,4EAA4E;IAC5E,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,8DAA8D;IAC9D,IAAI,EAAE,MAAM,CAAC;IACb;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,8CAA8C;IAC9C,KAAK,CAAC,EAAE,KAAK,CAAC;IACd,qEAAqE;IACrE,GAAG,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IAChC,iFAAiF;IACjF,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;;;;;;;;;;;;;;;;;OAkBG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF;;GAEG;AACH,wBAAgB,WAAW,CAAC,QAAQ,EAAE,aAAa,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,CAExE;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE,gBAAgB,GAAG,MAAM,CAyI3D;AAwDD,MAAM,MAAM,eAAe,GAAG;IAC5B,sDAAsD;IACtD,GAAG,EAAE,MAAM,CAAC;IACZ,2BAA2B;IAC3B,GAAG,EAAE,MAAM,CAAC;IACZ,8CAA8C;IAC9C,KAAK,CAAC,EAAE,KAAK,CAAC;CACf,CAAC;AAEF;;;;;;;GAOG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE,eAAe,GAAG,MAAM,CAIzD"}
|
package/dist/_lib/baas.js
CHANGED
|
@@ -53,7 +53,7 @@ exports.tarFrontend = tarFrontend;
|
|
|
53
53
|
*/
|
|
54
54
|
const child_process_1 = require("child_process");
|
|
55
55
|
const smart_engines_sdk_1 = require("@hsuite/smart-engines-sdk");
|
|
56
|
-
const
|
|
56
|
+
const owner_signer_1 = require("./owner-signer");
|
|
57
57
|
const docker_1 = require("./docker");
|
|
58
58
|
const image_hygiene_1 = require("./image-hygiene");
|
|
59
59
|
const transport_1 = require("./transport");
|
|
@@ -68,12 +68,12 @@ exports.DEFAULT_DEPLOY_TIMEOUT_MS = 240_000;
|
|
|
68
68
|
*/
|
|
69
69
|
exports.DEFAULT_BUILD_PLATFORM = 'linux/amd64';
|
|
70
70
|
/**
|
|
71
|
-
* Construct the ONE {@link BaasClient} and authenticate it with the
|
|
71
|
+
* Construct the ONE {@link BaasClient} and authenticate it with the owner
|
|
72
72
|
* signer. Returns the authenticated client. Throws on a missing signer or an
|
|
73
73
|
* auth failure (the command-level action renders + exits).
|
|
74
74
|
*/
|
|
75
75
|
async function connectAndAuth(opts) {
|
|
76
|
-
const signer = (0,
|
|
76
|
+
const signer = opts.signer ?? (await (0, owner_signer_1.resolveOwnerSigner)(opts.env));
|
|
77
77
|
const config = {
|
|
78
78
|
hostUrl: opts.gateway,
|
|
79
79
|
appId: opts.appId ?? 'pending',
|
|
@@ -82,12 +82,7 @@ async function connectAndAuth(opts) {
|
|
|
82
82
|
timeout: opts.timeout ?? exports.DEFAULT_DEPLOY_TIMEOUT_MS,
|
|
83
83
|
};
|
|
84
84
|
const client = (opts.clientFactory ?? ((c) => new smart_engines_sdk_1.BaasClient(c)))(config);
|
|
85
|
-
await client.authenticate(
|
|
86
|
-
chain: signer.chain,
|
|
87
|
-
walletAddress: signer.walletAddress,
|
|
88
|
-
publicKey: signer.publicKey,
|
|
89
|
-
signFn: signer.signFn,
|
|
90
|
-
});
|
|
85
|
+
await client.authenticate((0, owner_signer_1.forPurpose)(signer, 'login'));
|
|
91
86
|
return client;
|
|
92
87
|
}
|
|
93
88
|
/**
|
package/dist/_lib/baas.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"baas.js","sourceRoot":"","sources":["../../src/_lib/baas.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"baas.js","sourceRoot":"","s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wDAAwD,CAC3D,CAAC;IACJ,CAAC;IACD,IAAI,UAAU,IAAI,UAAU,KAAK,cAAc,EAAE,CAAC;QAChD,MAAM,IAAI,KAAK,CACb,uBAAuB,GAAG,2BAA2B,UAAU,oBAAoB;YACjF,UAAU,cAAc,2DAA2D;YACnF,0DAA0D,CAC7D,CAAC;IACJ,CAAC;IACD,OAAO,cAAc,CAAC;AACxB,CAAC;AAWD;;;;;;;GAOG;AACH,SAAgB,WAAW,CAAC,IAAqB;IAC/C,MAAM,GAAG,GAAG,IAAI,CAAC,KAAK,IAAK,4BAAiC,CAAC;IAC7D,GAAG,CAAC,KAAK,EAAE,CAAC,KAAK,EAAE,IAAI,CAAC,GAAG,EAAE,IAAI,EAAE,IAAI,CAAC,GAAG,EAAE,GAAG,CAAC,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC,CAAC;IACzE,OAAO,IAAI,CAAC,GAAG,CAAC;AAClB,CAAC"}
|
|
@@ -71,7 +71,7 @@ export type ClusterRuntimeObservation = {
|
|
|
71
71
|
/** Probe-level failure (unreachable / auth failed / malformed answer). */
|
|
72
72
|
error?: string;
|
|
73
73
|
};
|
|
74
|
-
/** XRPL (or other chain) signer —
|
|
74
|
+
/** XRPL (or other chain) signer — the shape `resolveOwnerSigner` returns. */
|
|
75
75
|
export type ConvergenceSigner = {
|
|
76
76
|
chain: string;
|
|
77
77
|
walletAddress: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cluster-convergence.d.ts","sourceRoot":"","sources":["../../src/_lib/cluster-convergence.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AACH,OAAO,EAQL,KAAK,iBAAiB,EACvB,MAAM,mBAAmB,CAAC;AAK3B,8CAA8C;AAC9C,MAAM,MAAM,yBAAyB,GAAG;IACtC,uCAAuC;IACvC,EAAE,EAAE,MAAM,CAAC;IACX,0FAA0F;IAC1F,SAAS,EAA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CG;AACH,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,mBAAmB,GAAG,IAAI,CA0DvE;AAED,MAAM,MAAM,6BAA6B,GAAG,wBAAwB,GAAG;IACrE,iEAAiE;IACjE,aAAa,EAAE,MAAM,CAAC;IACtB,oCAAoC;IACpC,cAAc,EAAE,MAAM,CAAC;IACvB,wDAAwD;IACxD,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,+EAA+E;IAC/E,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,kCAAkC;IAClC,KAAK,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;CACvC,CAAC;AAEF;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAsB,yBAAyB,CAC7C,IAAI,EAAE,6BAA6B,GAClC,OAAO,CAAC,yBAAyB,EAAE,CAAC,CAqDtC"}
|
package/dist/_lib/env.d.ts
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
export type EnvMap = Map<string, string>;
|
|
2
|
+
/** `export KEY=v` is valid dotenv/shell syntax: the key is `KEY`, not `export KEY`. */
|
|
3
|
+
export declare function envKeyName(rawKey: string): string;
|
|
2
4
|
export declare function readEnv(path: string): EnvMap;
|
|
3
5
|
export declare function upsertEnv(path: string, updates: Record<string, string>): void;
|
|
4
6
|
/**
|
|
@@ -7,11 +9,4 @@ export declare function upsertEnv(path: string, updates: Record<string, string>)
|
|
|
7
9
|
* none of the keys is set.
|
|
8
10
|
*/
|
|
9
11
|
export declare function removeEnvKeys(path: string, keys: readonly string[]): void;
|
|
10
|
-
export type AuthSigner = {
|
|
11
|
-
chain: 'xrpl';
|
|
12
|
-
walletAddress: string;
|
|
13
|
-
publicKey: string;
|
|
14
|
-
signFn: (message: string) => string;
|
|
15
|
-
};
|
|
16
|
-
export declare function buildSignerFromEnv(env: EnvMap): AuthSigner;
|
|
17
12
|
//# sourceMappingURL=env.d.ts.map
|
package/dist/_lib/env.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"env.d.ts","sourceRoot":"","sources":["../../src/_lib/env.ts"],"names":[],"mappings":"AA0BA,MAAM,MAAM,MAAM,GAAG,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAEzC,wBAAgB,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAgB5C;AA4CD,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,IAAI,CAuB7E;AAED;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,MAAM,EAAE,GAAG,IAAI,CAYzE
|
|
1
|
+
{"version":3,"file":"env.d.ts","sourceRoot":"","sources":["../../src/_lib/env.ts"],"names":[],"mappings":"AA0BA,MAAM,MAAM,MAAM,GAAG,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAEzC,uFAAuF;AACvF,wBAAgB,UAAU,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAEjD;AAED,wBAAgB,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAgB5C;AA4CD,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,IAAI,CAuB7E;AAED;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,MAAM,EAAE,GAAG,IAAI,CAYzE"}
|
package/dist/_lib/env.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.envKeyName = envKeyName;
|
|
3
4
|
exports.readEnv = readEnv;
|
|
4
5
|
exports.upsertEnv = upsertEnv;
|
|
5
6
|
exports.removeEnvKeys = removeEnvKeys;
|
|
6
|
-
exports.buildSignerFromEnv = buildSignerFromEnv;
|
|
7
7
|
/**
|
|
8
|
-
* Tiny .env parser/writer
|
|
8
|
+
* Tiny .env parser/writer. The owner signer is built in `./owner-signer`.
|
|
9
9
|
*
|
|
10
10
|
* Smart Engines V3 smart-app auth is **XRPL-only by design** (per the
|
|
11
11
|
* HSUITE→XRPL migration). Hedera credentials are NOT required by the
|
|
@@ -17,6 +17,10 @@ exports.buildSignerFromEnv = buildSignerFromEnv;
|
|
|
17
17
|
*/
|
|
18
18
|
const crypto_1 = require("crypto");
|
|
19
19
|
const fs_1 = require("fs");
|
|
20
|
+
/** `export KEY=v` is valid dotenv/shell syntax: the key is `KEY`, not `export KEY`. */
|
|
21
|
+
function envKeyName(rawKey) {
|
|
22
|
+
return rawKey.replace(/^export\s+/, '').trim();
|
|
23
|
+
}
|
|
20
24
|
function readEnv(path) {
|
|
21
25
|
if (!(0, fs_1.existsSync)(path))
|
|
22
26
|
throw new Error(`env file not found: ${path}`);
|
|
@@ -28,7 +32,7 @@ function readEnv(path) {
|
|
|
28
32
|
const eq = line.indexOf('=');
|
|
29
33
|
if (eq < 0)
|
|
30
34
|
continue;
|
|
31
|
-
const key = line.slice(0, eq).trim();
|
|
35
|
+
const key = envKeyName(line.slice(0, eq).trim());
|
|
32
36
|
let val = line.slice(eq + 1).trim();
|
|
33
37
|
if ((val.startsWith('"') && val.endsWith('"')) || (val.startsWith("'") && val.endsWith("'"))) {
|
|
34
38
|
val = val.slice(1, -1);
|
|
@@ -128,31 +132,4 @@ function removeEnvKeys(path, keys) {
|
|
|
128
132
|
return;
|
|
129
133
|
writeFileAtomic(path, kept.join('\n'));
|
|
130
134
|
}
|
|
131
|
-
function buildSignerFromEnv(env) {
|
|
132
|
-
const seed = env.get('XRPL_SEED');
|
|
133
|
-
const address = env.get('XRPL_ADDRESS');
|
|
134
|
-
if (!seed || !address) {
|
|
135
|
-
throw new Error('XRPL_SEED + XRPL_ADDRESS required. Run `hsuite init` to generate a fresh wallet.');
|
|
136
|
-
}
|
|
137
|
-
// The seed's OWN key (#3667): `deriveKeypair(seed)` respects the algorithm the seed carries.
|
|
138
|
-
// `xrpl.Wallet.fromSeed(seed)` forces ed25519, so a secp256k1 seed logged in with a key that
|
|
139
|
-
// does not belong to XRPL_ADDRESS. Same derivation as `buildXrplLoginSigner`.
|
|
140
|
-
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
|
141
|
-
const { deriveKeypair, sign } = require('ripple-keypairs');
|
|
142
|
-
const { publicKey, privateKey } = deriveKeypair(seed);
|
|
143
|
-
return {
|
|
144
|
-
chain: 'xrpl',
|
|
145
|
-
walletAddress: address,
|
|
146
|
-
publicKey,
|
|
147
|
-
signFn: (message) => {
|
|
148
|
-
// XRPL Web3 challenge-response: cluster's Web3AuthService verifies via
|
|
149
|
-
// ripple-keypairs.verify(messageHex.toUpperCase(), signature, publicKey)
|
|
150
|
-
// — see libs/security-core/src/auth/web3-auth.service.ts:240.
|
|
151
|
-
// Match that exactly: hex-encode the UTF-8 challenge, uppercase, then
|
|
152
|
-
// sign with the derived private key via ripple-keypairs.sign.
|
|
153
|
-
const messageHex = Buffer.from(message, 'utf-8').toString('hex').toUpperCase();
|
|
154
|
-
return sign(messageHex, privateKey);
|
|
155
|
-
},
|
|
156
|
-
};
|
|
157
|
-
}
|
|
158
135
|
//# sourceMappingURL=env.js.map
|
package/dist/_lib/env.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"env.js","sourceRoot":"","sources":["../../src/_lib/env.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"env.js","sourceRoot":"","sources":["../../src/_lib/env.ts"],"names":[],"mappings":";;AA6BA,gCAEC;AAED,0BAgBC;AA4CD,8BAuBC;AAOD,sCAYC;AAvID;;;;;;;;;;GAUG;AACH,mCAAqC;AACrC,2BAYY;AAIZ,uFAAuF;AACvF,SAAgB,UAAU,CAAC,MAAc;IACvC,OAAO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