@tangle-network/blueprint-ui 0.3.0 → 0.4.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.
@@ -0,0 +1,677 @@
1
+ // Testing harness for iframe blueprints. The promise of the SDK is that
2
+ // publishers can iterate on their UI without running the Tangle Cloud dapp
3
+ // — these utilities are what makes that true.
4
+
5
+ import {
6
+ type FC,
7
+ type ReactNode,
8
+ useCallback,
9
+ useEffect,
10
+ useMemo,
11
+ useRef,
12
+ useState,
13
+ } from 'react';
14
+ import type { Address } from 'viem';
15
+
16
+ import type {
17
+ ServiceSnapshot,
18
+ WalletSnapshot,
19
+ } from './tangleIframeClient';
20
+ import type {
21
+ CallJobRequest,
22
+ JobInputs,
23
+ JobResultEvent,
24
+ ParentMessage,
25
+ ServiceContextBroadcast,
26
+ ServiceContextJob,
27
+ ServiceContextOperator,
28
+ } from '../wallet/parentBridgeProtocol';
29
+
30
+ export type MockWalletInput = Partial<{
31
+ address: Address | null;
32
+ chainId: number;
33
+ isConnected: boolean;
34
+ }>;
35
+
36
+ export type MockServiceInput = Partial<{
37
+ blueprintId: string;
38
+ serviceId: string | null;
39
+ operators: readonly ServiceContextOperator[];
40
+ jobs: readonly ServiceContextJob[];
41
+ mode: string | null;
42
+ }>;
43
+
44
+ /**
45
+ * Construct a deterministic wallet snapshot for tests. Defaults:
46
+ * connected, vitalik.eth's address, Base Sepolia (84532).
47
+ */
48
+ export function mockWallet(input: MockWalletInput = {}): WalletSnapshot {
49
+ return {
50
+ address:
51
+ input.address === undefined
52
+ ? '0xd8da6bf26964af9d7eed9e03e53415d37aa96045'
53
+ : input.address,
54
+ chainId: input.chainId ?? 84532,
55
+ isConnected: input.isConnected ?? input.address !== null,
56
+ };
57
+ }
58
+
59
+ /**
60
+ * Construct a deterministic service snapshot for tests. Defaults: blueprint
61
+ * id `0`, no service deployed yet (serviceId null), single mock operator on
62
+ * the canonical local sidecar URL.
63
+ */
64
+ export function mockServiceContext(
65
+ input: MockServiceInput = {},
66
+ ): ServiceSnapshot {
67
+ return {
68
+ blueprintId: input.blueprintId ?? '0',
69
+ serviceId: input.serviceId === undefined ? null : input.serviceId,
70
+ operators:
71
+ input.operators ?? [
72
+ {
73
+ address: '0x70997970C51812dc3A010C7d01b50e0d17dc79C8',
74
+ rpcAddress: 'http://localhost:8545',
75
+ status: 'active',
76
+ },
77
+ ],
78
+ jobs:
79
+ input.jobs ?? [
80
+ { index: 0, name: 'invoke' },
81
+ ],
82
+ mode: input.mode ?? null,
83
+ };
84
+ }
85
+
86
+ export type CallJobHandler = (
87
+ request: CallJobRequest,
88
+ ) => Promise<{
89
+ status: 'success' | 'error';
90
+ data?: unknown;
91
+ error?: string;
92
+ /** Streaming chunks emitted in order before the terminal status. */
93
+ chunks?: readonly unknown[];
94
+ }>;
95
+
96
+ type HarnessProps = {
97
+ appId?: string;
98
+ wallet?: WalletSnapshot;
99
+ service?: ServiceSnapshot;
100
+ /** Override callJob behavior. Default: returns a static `{ ok: true }`. */
101
+ onCallJob?: CallJobHandler;
102
+ /** Surface a floating debug panel that lets the developer flip state at runtime. */
103
+ showDebugPanel?: boolean;
104
+ children: ReactNode;
105
+ };
106
+
107
+ /**
108
+ * Drop-in parent simulator for tests + storybook + standalone dev. Wraps
109
+ * children in a fake parent that:
110
+ *
111
+ * - Acks the iframe's handshake immediately
112
+ * - Broadcasts the configured wallet + service context on mount
113
+ * - Intercepts `callJob` requests and routes them through `onCallJob`
114
+ * - (Optional) Mounts a floating debug panel so the developer can
115
+ * mutate state at runtime: change account, switch chain, set
116
+ * serviceId, fire a custom job
117
+ *
118
+ * The harness runs in the same JS context as the iframe app — there's no
119
+ * cross-frame postMessage, just same-window event dispatch. That keeps it
120
+ * fully synchronous + assertable, but the messages still flow through the
121
+ * exact same protocol surface the production bridge uses.
122
+ *
123
+ * Usage:
124
+ *
125
+ * <TangleParentHarness wallet={mockWallet()} service={mockServiceContext()}>
126
+ * <TangleIframeProvider appId="my-app" mode="bridge" parentOrigin="harness://">
127
+ * <App />
128
+ * </TangleIframeProvider>
129
+ * </TangleParentHarness>
130
+ *
131
+ * Set `mode="bridge"` + `parentOrigin="harness://"` on the provider so it
132
+ * matches the harness's synthetic origin. In production, use `mode="auto"`
133
+ * (the default).
134
+ */
135
+ export const TangleParentHarness: FC<HarnessProps> = ({
136
+ appId = 'harness',
137
+ wallet = mockWallet(),
138
+ service = mockServiceContext(),
139
+ onCallJob,
140
+ showDebugPanel = false,
141
+ children,
142
+ }) => {
143
+ const [currentWallet, setCurrentWallet] = useState<WalletSnapshot>(wallet);
144
+ const [currentService, setCurrentService] =
145
+ useState<ServiceSnapshot>(service);
146
+ const [callLog, setCallLog] = useState<CallJobRequest[]>([]);
147
+ const callJobHandler = useRef<CallJobHandler | undefined>(onCallJob);
148
+ callJobHandler.current = onCallJob;
149
+ const seenHandshake = useRef(false);
150
+
151
+ // Listen for iframe → "parent" messages. Since the harness shares the
152
+ // window, `window.postMessage` with the synthetic origin is the easiest
153
+ // wire — the iframe SDK posts to `window.parent`, which in same-window
154
+ // mode IS this listener.
155
+ useEffect(() => {
156
+ const reply = (message: ParentMessage) => {
157
+ window.dispatchEvent(
158
+ new MessageEvent('message', {
159
+ data: message,
160
+ origin: HARNESS_ORIGIN,
161
+ }),
162
+ );
163
+ };
164
+
165
+ const broadcast = () => {
166
+ const broadcastMsg: ServiceContextBroadcast = {
167
+ kind: 'tangle.app.serviceContext',
168
+ blueprintId: currentService.blueprintId ?? '0',
169
+ serviceId: currentService.serviceId,
170
+ operators: currentService.operators,
171
+ jobs: currentService.jobs,
172
+ mode: currentService.mode,
173
+ };
174
+ reply(broadcastMsg);
175
+ // Also broadcast wallet — combined into accountChanged + chainChanged.
176
+ reply({
177
+ kind: 'tangle.app.accountChanged',
178
+ account: currentWallet.address,
179
+ });
180
+ if (currentWallet.chainId !== null) {
181
+ reply({
182
+ kind: 'tangle.app.chainChanged',
183
+ chainId: currentWallet.chainId,
184
+ });
185
+ }
186
+ };
187
+
188
+ const handler = async (event: MessageEvent) => {
189
+ // The iframe posts via `window.parent.postMessage(msg, parentOrigin)`.
190
+ // In same-window mode, that fires a message event on this same window
191
+ // with origin = parentOrigin. Filter out events the harness itself
192
+ // dispatched (origin === HARNESS_ORIGIN) — those are replies.
193
+ if (event.origin === HARNESS_ORIGIN) return;
194
+ const data = event.data;
195
+ if (typeof data !== 'object' || data === null) return;
196
+ const message = data as { kind?: string; correlationId?: string };
197
+
198
+ switch (message.kind) {
199
+ case 'tangle.app.handshake': {
200
+ if (!seenHandshake.current) {
201
+ seenHandshake.current = true;
202
+ reply({
203
+ kind: 'tangle.app.handshakeAck',
204
+ appId,
205
+ protocolVersion: '1',
206
+ });
207
+ broadcast();
208
+ }
209
+ return;
210
+ }
211
+ case 'tangle.app.readAccount': {
212
+ if (typeof message.correlationId !== 'string') return;
213
+ reply({
214
+ kind: 'tangle.app.readAccountResult',
215
+ correlationId: message.correlationId,
216
+ ok: true,
217
+ data: {
218
+ account:
219
+ currentWallet.address ??
220
+ ('0x0000000000000000000000000000000000000000' as Address),
221
+ chainId: currentWallet.chainId ?? 0,
222
+ },
223
+ });
224
+ return;
225
+ }
226
+ case 'tangle.app.callJob': {
227
+ if (typeof message.correlationId !== 'string') return;
228
+ const request = message as unknown as CallJobRequest;
229
+ setCallLog((prev) => [...prev, request]);
230
+ // Default behavior when no handler: emit a single `success` with
231
+ // a echo of the inputs so UIs render *something* in dev mode.
232
+ const handler = callJobHandler.current;
233
+ if (!handler) {
234
+ const result: JobResultEvent = {
235
+ kind: 'tangle.app.jobResult',
236
+ correlationId: request.correlationId,
237
+ status: 'success',
238
+ data: { echo: request.inputs },
239
+ };
240
+ reply(result);
241
+ return;
242
+ }
243
+ try {
244
+ const outcome = await handler(request);
245
+ for (const chunk of outcome.chunks ?? []) {
246
+ reply({
247
+ kind: 'tangle.app.jobResult',
248
+ correlationId: request.correlationId,
249
+ status: 'streaming',
250
+ chunk,
251
+ });
252
+ }
253
+ reply({
254
+ kind: 'tangle.app.jobResult',
255
+ correlationId: request.correlationId,
256
+ status: outcome.status,
257
+ ...(outcome.data !== undefined ? { data: outcome.data } : {}),
258
+ ...(outcome.error !== undefined ? { error: outcome.error } : {}),
259
+ });
260
+ } catch (err) {
261
+ reply({
262
+ kind: 'tangle.app.jobResult',
263
+ correlationId: request.correlationId,
264
+ status: 'error',
265
+ error: err instanceof Error ? err.message : String(err),
266
+ });
267
+ }
268
+ return;
269
+ }
270
+ // Wallet ops respond optimistically — tests that want to assert
271
+ // specific signatures should pre-set them via the dev handler.
272
+ case 'tangle.app.signMessage': {
273
+ if (typeof message.correlationId !== 'string') return;
274
+ reply({
275
+ kind: 'tangle.app.signMessageResult',
276
+ correlationId: message.correlationId,
277
+ ok: true,
278
+ data: { signature: '0xdeadbeef' as `0x${string}` },
279
+ });
280
+ return;
281
+ }
282
+ case 'tangle.app.signTransaction': {
283
+ if (typeof message.correlationId !== 'string') return;
284
+ reply({
285
+ kind: 'tangle.app.signTransactionResult',
286
+ correlationId: message.correlationId,
287
+ ok: true,
288
+ data: { txHash: ('0x' + '00'.repeat(32)) as `0x${string}` },
289
+ });
290
+ return;
291
+ }
292
+ case 'tangle.app.switchChain': {
293
+ if (
294
+ typeof message.correlationId !== 'string' ||
295
+ typeof (message as unknown as { chainId?: number }).chainId !== 'number'
296
+ ) {
297
+ return;
298
+ }
299
+ const chainId = (message as unknown as { chainId: number }).chainId;
300
+ setCurrentWallet((w) => ({ ...w, chainId }));
301
+ reply({
302
+ kind: 'tangle.app.switchChainResult',
303
+ correlationId: message.correlationId,
304
+ ok: true,
305
+ data: { chainId },
306
+ });
307
+ return;
308
+ }
309
+ }
310
+ };
311
+ window.addEventListener('message', handler);
312
+ return () => window.removeEventListener('message', handler);
313
+ }, [appId, currentWallet, currentService]);
314
+
315
+ // Re-broadcast when state changes.
316
+ useEffect(() => {
317
+ if (!seenHandshake.current) return;
318
+ window.dispatchEvent(
319
+ new MessageEvent('message', {
320
+ data: {
321
+ kind: 'tangle.app.accountChanged',
322
+ account: currentWallet.address,
323
+ },
324
+ origin: HARNESS_ORIGIN,
325
+ }),
326
+ );
327
+ }, [currentWallet.address]);
328
+
329
+ useEffect(() => {
330
+ if (!seenHandshake.current || currentWallet.chainId === null) return;
331
+ window.dispatchEvent(
332
+ new MessageEvent('message', {
333
+ data: {
334
+ kind: 'tangle.app.chainChanged',
335
+ chainId: currentWallet.chainId,
336
+ },
337
+ origin: HARNESS_ORIGIN,
338
+ }),
339
+ );
340
+ }, [currentWallet.chainId]);
341
+
342
+ useEffect(() => {
343
+ if (!seenHandshake.current) return;
344
+ window.dispatchEvent(
345
+ new MessageEvent('message', {
346
+ data: {
347
+ kind: 'tangle.app.serviceContext',
348
+ blueprintId: currentService.blueprintId ?? '0',
349
+ serviceId: currentService.serviceId,
350
+ operators: currentService.operators,
351
+ jobs: currentService.jobs,
352
+ mode: currentService.mode,
353
+ },
354
+ origin: HARNESS_ORIGIN,
355
+ }),
356
+ );
357
+ }, [currentService]);
358
+
359
+ const debugApi = useMemo(
360
+ () => ({
361
+ setWallet: setCurrentWallet,
362
+ setService: setCurrentService,
363
+ callLog,
364
+ }),
365
+ [callLog],
366
+ );
367
+
368
+ return (
369
+ <>
370
+ {children}
371
+ {showDebugPanel && <DebugPanel api={debugApi} />}
372
+ </>
373
+ );
374
+ };
375
+
376
+ /**
377
+ * Synthetic origin every harness instance uses. Stable across tests so the
378
+ * iframe SDK + the harness can pin to the same string.
379
+ */
380
+ export const HARNESS_ORIGIN = 'harness://tangle.local';
381
+
382
+ // ── Debug panel ──────────────────────────────────────────────────────────────
383
+
384
+ const DebugPanel: FC<{
385
+ api: {
386
+ setWallet: (w: WalletSnapshot | ((prev: WalletSnapshot) => WalletSnapshot)) => void;
387
+ setService: (
388
+ s: ServiceSnapshot | ((prev: ServiceSnapshot) => ServiceSnapshot),
389
+ ) => void;
390
+ callLog: readonly CallJobRequest[];
391
+ };
392
+ }> = ({ api }) => {
393
+ const [open, setOpen] = useState(true);
394
+ const [tab, setTab] = useState<'wallet' | 'service' | 'log'>('wallet');
395
+ if (!open) {
396
+ return (
397
+ <button
398
+ type="button"
399
+ onClick={() => setOpen(true)}
400
+ style={debugStyles.collapsedTrigger}
401
+ >
402
+ Debug
403
+ </button>
404
+ );
405
+ }
406
+ return (
407
+ <div style={debugStyles.panel}>
408
+ <header style={debugStyles.header}>
409
+ <strong style={{ fontSize: 11 }}>TANGLE DEV HARNESS</strong>
410
+ <button
411
+ type="button"
412
+ onClick={() => setOpen(false)}
413
+ style={debugStyles.closeButton}
414
+ aria-label="Close debug panel"
415
+ >
416
+ ×
417
+ </button>
418
+ </header>
419
+ <nav style={debugStyles.tabs}>
420
+ {(['wallet', 'service', 'log'] as const).map((t) => (
421
+ <button
422
+ key={t}
423
+ type="button"
424
+ onClick={() => setTab(t)}
425
+ style={{
426
+ ...debugStyles.tab,
427
+ ...(tab === t ? debugStyles.tabActive : {}),
428
+ }}
429
+ >
430
+ {t}
431
+ </button>
432
+ ))}
433
+ </nav>
434
+ <div style={debugStyles.body}>
435
+ {tab === 'wallet' && <WalletTab api={api} />}
436
+ {tab === 'service' && <ServiceTab api={api} />}
437
+ {tab === 'log' && <CallLogTab callLog={api.callLog} />}
438
+ </div>
439
+ </div>
440
+ );
441
+ };
442
+
443
+ const WalletTab: FC<{
444
+ api: { setWallet: (w: WalletSnapshot | ((prev: WalletSnapshot) => WalletSnapshot)) => void };
445
+ }> = ({ api }) => {
446
+ const [address, setAddressInput] = useState(
447
+ '0xd8da6bf26964af9d7eed9e03e53415d37aa96045',
448
+ );
449
+ const [chainId, setChainIdInput] = useState('84532');
450
+ const applyConnect = useCallback(() => {
451
+ api.setWallet({
452
+ address: address as Address,
453
+ chainId: Number(chainId) || null,
454
+ isConnected: true,
455
+ });
456
+ }, [address, chainId, api]);
457
+ const disconnect = useCallback(() => {
458
+ api.setWallet({ address: null, chainId: null, isConnected: false });
459
+ }, [api]);
460
+ return (
461
+ <div>
462
+ <label style={debugStyles.label}>address</label>
463
+ <input
464
+ value={address}
465
+ onChange={(e) => setAddressInput(e.target.value)}
466
+ style={debugStyles.input}
467
+ />
468
+ <label style={debugStyles.label}>chain id</label>
469
+ <input
470
+ value={chainId}
471
+ onChange={(e) => setChainIdInput(e.target.value)}
472
+ style={debugStyles.input}
473
+ />
474
+ <div style={debugStyles.buttonRow}>
475
+ <button type="button" onClick={applyConnect} style={debugStyles.primary}>
476
+ Set connected
477
+ </button>
478
+ <button type="button" onClick={disconnect} style={debugStyles.secondary}>
479
+ Disconnect
480
+ </button>
481
+ </div>
482
+ </div>
483
+ );
484
+ };
485
+
486
+ const ServiceTab: FC<{
487
+ api: {
488
+ setService: (
489
+ s: ServiceSnapshot | ((prev: ServiceSnapshot) => ServiceSnapshot),
490
+ ) => void;
491
+ };
492
+ }> = ({ api }) => {
493
+ const [serviceId, setServiceIdInput] = useState('1');
494
+ const [blueprintId, setBlueprintIdInput] = useState('0');
495
+ const apply = useCallback(() => {
496
+ api.setService((prev) => ({
497
+ ...prev,
498
+ serviceId: serviceId || null,
499
+ blueprintId,
500
+ }));
501
+ }, [api, serviceId, blueprintId]);
502
+ const clearService = useCallback(() => {
503
+ api.setService((prev) => ({ ...prev, serviceId: null }));
504
+ }, [api]);
505
+ return (
506
+ <div>
507
+ <label style={debugStyles.label}>blueprint id</label>
508
+ <input
509
+ value={blueprintId}
510
+ onChange={(e) => setBlueprintIdInput(e.target.value)}
511
+ style={debugStyles.input}
512
+ />
513
+ <label style={debugStyles.label}>service id (empty = not deployed)</label>
514
+ <input
515
+ value={serviceId}
516
+ onChange={(e) => setServiceIdInput(e.target.value)}
517
+ style={debugStyles.input}
518
+ />
519
+ <div style={debugStyles.buttonRow}>
520
+ <button type="button" onClick={apply} style={debugStyles.primary}>
521
+ Apply
522
+ </button>
523
+ <button type="button" onClick={clearService} style={debugStyles.secondary}>
524
+ Clear service
525
+ </button>
526
+ </div>
527
+ </div>
528
+ );
529
+ };
530
+
531
+ const CallLogTab: FC<{ callLog: readonly CallJobRequest[] }> = ({ callLog }) => {
532
+ if (callLog.length === 0) {
533
+ return <p style={debugStyles.empty}>No callJob requests yet.</p>;
534
+ }
535
+ return (
536
+ <ol style={debugStyles.log}>
537
+ {callLog.map((entry) => (
538
+ <li key={entry.correlationId} style={debugStyles.logEntry}>
539
+ <strong>job {entry.jobIndex}</strong>
540
+ <pre style={debugStyles.pre}>
541
+ {JSON.stringify(entry.inputs, null, 2)}
542
+ </pre>
543
+ </li>
544
+ ))}
545
+ </ol>
546
+ );
547
+ };
548
+
549
+ // Inline styles keep the harness style-system-agnostic — consumers may not
550
+ // ship Tailwind, and the panel shouldn't add a dependency.
551
+ const debugStyles = {
552
+ panel: {
553
+ position: 'fixed' as const,
554
+ right: 12,
555
+ top: 12,
556
+ width: 280,
557
+ zIndex: 99999,
558
+ background: '#0b0b14',
559
+ color: '#fff',
560
+ border: '1px solid #3a3a52',
561
+ borderRadius: 10,
562
+ boxShadow: '0 14px 32px rgba(0,0,0,0.4)',
563
+ fontFamily:
564
+ 'ui-monospace, SFMono-Regular, Menlo, Monaco, "Cascadia Code", monospace',
565
+ fontSize: 12,
566
+ },
567
+ header: {
568
+ display: 'flex',
569
+ alignItems: 'center',
570
+ justifyContent: 'space-between',
571
+ padding: '8px 10px',
572
+ borderBottom: '1px solid #2a2a3e',
573
+ },
574
+ closeButton: {
575
+ background: 'none',
576
+ border: 'none',
577
+ color: '#fff',
578
+ fontSize: 18,
579
+ cursor: 'pointer',
580
+ lineHeight: 1,
581
+ },
582
+ tabs: {
583
+ display: 'flex',
584
+ borderBottom: '1px solid #2a2a3e',
585
+ },
586
+ tab: {
587
+ flex: 1,
588
+ background: 'none',
589
+ border: 'none',
590
+ color: '#a0a0c0',
591
+ padding: '6px 8px',
592
+ cursor: 'pointer',
593
+ fontSize: 11,
594
+ textTransform: 'uppercase' as const,
595
+ },
596
+ tabActive: {
597
+ color: '#fff',
598
+ borderBottom: '2px solid #818cf8',
599
+ },
600
+ body: {
601
+ padding: 10,
602
+ maxHeight: 320,
603
+ overflow: 'auto' as const,
604
+ },
605
+ label: {
606
+ display: 'block',
607
+ color: '#a0a0c0',
608
+ fontSize: 10,
609
+ marginBottom: 4,
610
+ marginTop: 6,
611
+ textTransform: 'uppercase' as const,
612
+ },
613
+ input: {
614
+ width: '100%',
615
+ background: '#15152a',
616
+ border: '1px solid #2a2a3e',
617
+ color: '#fff',
618
+ padding: '6px 8px',
619
+ borderRadius: 4,
620
+ fontFamily: 'inherit',
621
+ fontSize: 11,
622
+ boxSizing: 'border-box' as const,
623
+ },
624
+ buttonRow: { display: 'flex', gap: 6, marginTop: 8 },
625
+ primary: {
626
+ flex: 1,
627
+ background: '#4f46e5',
628
+ color: '#fff',
629
+ border: 'none',
630
+ padding: '6px 8px',
631
+ borderRadius: 4,
632
+ cursor: 'pointer',
633
+ fontSize: 11,
634
+ fontFamily: 'inherit',
635
+ },
636
+ secondary: {
637
+ flex: 1,
638
+ background: 'transparent',
639
+ color: '#a0a0c0',
640
+ border: '1px solid #3a3a52',
641
+ padding: '6px 8px',
642
+ borderRadius: 4,
643
+ cursor: 'pointer',
644
+ fontSize: 11,
645
+ fontFamily: 'inherit',
646
+ },
647
+ collapsedTrigger: {
648
+ position: 'fixed' as const,
649
+ right: 12,
650
+ top: 12,
651
+ zIndex: 99999,
652
+ padding: '6px 10px',
653
+ background: '#0b0b14',
654
+ border: '1px solid #3a3a52',
655
+ color: '#fff',
656
+ borderRadius: 6,
657
+ fontFamily: 'inherit',
658
+ fontSize: 11,
659
+ cursor: 'pointer',
660
+ },
661
+ log: { listStyle: 'none', padding: 0, margin: 0 },
662
+ logEntry: {
663
+ padding: 6,
664
+ borderBottom: '1px solid #2a2a3e',
665
+ fontSize: 11,
666
+ },
667
+ pre: {
668
+ margin: '4px 0 0',
669
+ color: '#a0a0c0',
670
+ fontSize: 10,
671
+ whiteSpace: 'pre-wrap' as const,
672
+ wordBreak: 'break-word' as const,
673
+ },
674
+ empty: { color: '#a0a0c0', fontSize: 11, margin: 0 },
675
+ } as const;
676
+
677
+ export type { JobInputs };
@@ -52,12 +52,20 @@ export {
52
52
  NO_WALLET_ADDRESS,
53
53
  makeCorrelationId,
54
54
  type AccountChanged,
55
+ type CallJobRequest,
55
56
  type ChainChanged,
56
57
  type HandshakeAck,
57
58
  type HandshakeRequest,
59
+ type IframeRequest,
60
+ type JobInputs,
61
+ type JobResultEvent,
62
+ type JobResultStatus,
58
63
  type ParentMessage,
59
64
  type ReadAccountRequest,
60
65
  type ReadAccountResult,
66
+ type ServiceContextBroadcast,
67
+ type ServiceContextJob,
68
+ type ServiceContextOperator,
61
69
  type SignMessageRequest,
62
70
  type SignMessageResult,
63
71
  type SignTransactionRequest,