@le-space/ui 0.9.8 → 0.10.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/package.json +3 -3
- package/react/index.d.ts +70 -1
- package/react/index.js +819 -77
- package/shared/index.d.ts +115 -14
- package/shared/index.js +798 -77
- package/svelte/SponsorRelayFab.svelte +33 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@le-space/ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.10.0",
|
|
4
4
|
"description": "Floating Aleph Relay Button UI components for Svelte and React.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -44,8 +44,8 @@
|
|
|
44
44
|
"url": "https://github.com/NiKrause/relay-button/issues"
|
|
45
45
|
},
|
|
46
46
|
"dependencies": {
|
|
47
|
-
"@le-space/browser": "0.
|
|
48
|
-
"@le-space/core": "0.
|
|
47
|
+
"@le-space/browser": "0.10.0",
|
|
48
|
+
"@le-space/core": "0.10.0",
|
|
49
49
|
"viem": "^2.53.1"
|
|
50
50
|
},
|
|
51
51
|
"peerDependencies": {
|
package/react/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { AttestWasm } from '@le-space/attest-wasm/instance';
|
|
2
3
|
|
|
3
4
|
type CrnSource = 'list' | 'aggregate';
|
|
4
5
|
type CrnSourcePreference = 'auto' | 'aggregate' | 'list';
|
|
@@ -66,7 +67,17 @@ interface Crn {
|
|
|
66
67
|
gpu_support?: boolean;
|
|
67
68
|
system_usage?: CrnUsage | null;
|
|
68
69
|
payment_receiver_address?: string | null;
|
|
70
|
+
/** Registered owner (corechannel aggregate). */
|
|
71
|
+
owner?: string | null;
|
|
69
72
|
version?: string | null;
|
|
73
|
+
/** CPU features from the node's /about/usage/system, e.g. ["sev", "sev_es", "sev_snp"]. */
|
|
74
|
+
cpu_features?: string[] | null;
|
|
75
|
+
/** TEE properties from /about/usage/system; present on SEV-SNP nodes. */
|
|
76
|
+
tee?: {
|
|
77
|
+
sev_snp?: {
|
|
78
|
+
supported_vcpu_types?: string[];
|
|
79
|
+
};
|
|
80
|
+
} | null;
|
|
70
81
|
city?: string | null;
|
|
71
82
|
region?: string | null;
|
|
72
83
|
country?: string | null;
|
|
@@ -186,7 +197,7 @@ interface RootfsResolution {
|
|
|
186
197
|
gatewayError?: string | null;
|
|
187
198
|
}
|
|
188
199
|
|
|
189
|
-
type DeploymentProgressStage = "idle" | "validating" | "loading-manifest" | "verifying-rootfs" | "loading-pricing" | "loading-balance" | "selecting-crn" | "building-message" | "signing-message" | "broadcasting" | "notifying-crn" | "waiting-for-aleph" | "deployment-confirmed" | "deployment-rejected" | "publishing-bootstrap" | "building-delete-message" | "signing-delete-message" | "broadcasting-delete" | "delete-completed" | "refreshing-instances" | "completed" | "error";
|
|
200
|
+
type DeploymentProgressStage = "idle" | "validating" | "loading-manifest" | "verifying-rootfs" | "loading-pricing" | "loading-balance" | "selecting-crn" | "building-message" | "signing-message" | "broadcasting" | "notifying-crn" | "preparing-confidential" | "attesting-guest" | "unlocking-guest" | "waiting-for-aleph" | "deployment-confirmed" | "deployment-rejected" | "publishing-bootstrap" | "building-delete-message" | "signing-delete-message" | "broadcasting-delete" | "delete-completed" | "refreshing-instances" | "completed" | "error";
|
|
190
201
|
interface DeploymentProgressEvent {
|
|
191
202
|
stage: DeploymentProgressStage;
|
|
192
203
|
label: string;
|
|
@@ -221,6 +232,27 @@ interface SponsorRelayUcanStoreBootstrapInput {
|
|
|
221
232
|
pwaOrigin: string;
|
|
222
233
|
serviceOrigin: string;
|
|
223
234
|
}
|
|
235
|
+
interface SponsorRelayConfidentialStart {
|
|
236
|
+
/** STORE item hash of the LUKS-encrypted rootfs (aleph-confidential-rootfs, or the reusable workflow's confidential_rootfs_item_hash). */
|
|
237
|
+
rootfsItemHash: string;
|
|
238
|
+
/** Its size in MiB, if larger than the manifest's rootfs. */
|
|
239
|
+
rootfsSizeMiB?: number;
|
|
240
|
+
/** `wss://…/attest` of an attest relay (@le-space/attest-relay). */
|
|
241
|
+
relayUrl: string;
|
|
242
|
+
/**
|
|
243
|
+
* Loads the attestation WASM, e.g.
|
|
244
|
+
* `async () => { const m = await import('@le-space/attest-wasm/pkg/relay_button_attest.js'); await m.default(); return m }`.
|
|
245
|
+
*/
|
|
246
|
+
loadWasm: () => Promise<AttestWasm>;
|
|
247
|
+
/** An SNP instance runtime by name (vm-images); the network's default if absent. */
|
|
248
|
+
runtimeName?: string;
|
|
249
|
+
/**
|
|
250
|
+
* localStorage key under which nodes AMD cannot vouch for (KDS has no VCEK
|
|
251
|
+
* for their chip) are remembered for a week and tried last. Omit it and
|
|
252
|
+
* they are remembered for the page only.
|
|
253
|
+
*/
|
|
254
|
+
refusedNodesStorageKey?: string;
|
|
255
|
+
}
|
|
224
256
|
interface SponsorRelayProps {
|
|
225
257
|
debug?: boolean;
|
|
226
258
|
manifestUrl?: string;
|
|
@@ -241,6 +273,21 @@ interface SponsorRelayProps {
|
|
|
241
273
|
* fallback. `localStorage.LE_SPACE_CRN_SOURCE` overrides this at runtime.
|
|
242
274
|
*/
|
|
243
275
|
crnSource?: CrnSourcePreference;
|
|
276
|
+
/**
|
|
277
|
+
* Ask for a confidential VM (AMD SEV-SNP): only nodes that report SEV-SNP and
|
|
278
|
+
* run a patched aleph-vm are offered, and pricing uses Aleph's
|
|
279
|
+
* `instance_confidential` entry. The person can switch it in the panel too.
|
|
280
|
+
* Starting one needs `confidentialStart`; without it the panel refuses.
|
|
281
|
+
*/
|
|
282
|
+
confidential?: boolean;
|
|
283
|
+
/**
|
|
284
|
+
* What a confidential start needs (relay-button#169): the encrypted rootfs,
|
|
285
|
+
* an attest relay, and the attestation WASM. The browser computes the
|
|
286
|
+
* launch measurements for the connected wallet, signs the INSTANCE with
|
|
287
|
+
* them, verifies the guest through the relay against AMD, and unlocks it
|
|
288
|
+
* with the passphrase the person enters, signed by their wallet.
|
|
289
|
+
*/
|
|
290
|
+
confidentialStart?: SponsorRelayConfidentialStart;
|
|
244
291
|
schedulerApiHost?: string;
|
|
245
292
|
twoN6ApiHost?: string;
|
|
246
293
|
/**
|
|
@@ -359,6 +406,12 @@ interface SponsorRelayState {
|
|
|
359
406
|
instanceName: string;
|
|
360
407
|
ucanStoreBootstrap: SponsorRelayUcanStoreBootstrapInput;
|
|
361
408
|
tierId: string;
|
|
409
|
+
/** Confidential VM requested (AMD SEV-SNP); see the `confidential` prop. */
|
|
410
|
+
confidential: boolean;
|
|
411
|
+
/** Whether the host set `confidentialStart`, so a confidential VM can start. */
|
|
412
|
+
confidentialStartAvailable: boolean;
|
|
413
|
+
/** The encrypted rootfs's passphrase, held only until the unlock; never stored. */
|
|
414
|
+
confidentialPassphrase: string;
|
|
362
415
|
showAdvanced: boolean;
|
|
363
416
|
showInstances: boolean;
|
|
364
417
|
showPasteManifest: boolean;
|
|
@@ -386,6 +439,12 @@ interface SponsorRelayState {
|
|
|
386
439
|
hash: string;
|
|
387
440
|
name: string | null;
|
|
388
441
|
score: number | null;
|
|
442
|
+
/** ISO country code, when known. */
|
|
443
|
+
country: string | null;
|
|
444
|
+
/** aleph-vm version, when known. */
|
|
445
|
+
version: string | null;
|
|
446
|
+
/** Shortened owner / reward address: nodes of one operator share it. */
|
|
447
|
+
operator: string | null;
|
|
389
448
|
}>;
|
|
390
449
|
crnPinnedByUser: boolean;
|
|
391
450
|
instances: CompactInstanceRecord[];
|
|
@@ -447,6 +506,16 @@ declare class SponsorRelayController {
|
|
|
447
506
|
setUcanStoreBootstrapField(field: keyof SponsorRelayUcanStoreBootstrapInput, value: string): void;
|
|
448
507
|
setTierId(tierId: string): void;
|
|
449
508
|
private recomputePricingSummary;
|
|
509
|
+
/**
|
|
510
|
+
* Switch between a normal and a confidential VM. Pricing and the node list
|
|
511
|
+
* differ between the two, so both are loaded again.
|
|
512
|
+
*/
|
|
513
|
+
setConfidential(confidential: boolean): Promise<void>;
|
|
514
|
+
/**
|
|
515
|
+
* The encrypted rootfs's passphrase for a confidential start. Kept in
|
|
516
|
+
* memory only until the unlock, then cleared; never persisted.
|
|
517
|
+
*/
|
|
518
|
+
setConfidentialPassphrase(passphrase: string): void;
|
|
450
519
|
/** Pin a specific CRN as the first deploy attempt (null = automatic). */
|
|
451
520
|
selectCrn(hash: string | null): void;
|
|
452
521
|
private queueManifestRefresh;
|