diff --git a/product-sdk/packages/host/package.json b/product-sdk/packages/host/package.json index 11be475c..8075b0c8 100644 --- a/product-sdk/packages/host/package.json +++ b/product-sdk/packages/host/package.json @@ -32,7 +32,8 @@ "@polkadot-api/json-rpc-provider": "catalog:", "@polkadot-api/substrate-bindings": "catalog:", "neverthrow": "^8.2.0", - "polkadot-api": "catalog:" + "polkadot-api": "catalog:", + "@novasamatech/host-api-wrapper": "0.9.2" }, "devDependencies": { "tsup": "catalog:", diff --git a/product-sdk/packages/host/src/chat.ts b/product-sdk/packages/host/src/chat.ts index 968da495..f59f9a45 100644 --- a/product-sdk/packages/host/src/chat.ts +++ b/product-sdk/packages/host/src/chat.ts @@ -22,6 +22,7 @@ import type { } from "@parity/truapi"; import { getClient, subscribeWithInterrupt } from "./transport.js"; +import { getNativeChatManager, isNativeChatHost } from "./nativeChat.js"; import { fromHex, unwrapHostResult } from "./truapi.js"; import type { HostSubscription } from "./types.js"; @@ -230,7 +231,13 @@ function adaptChatManager(client: TrUApiClient): ChatManager { */ export async function getChatManager(): Promise { const client = await getClient(); - return client ? adaptChatManager(client) : null; + if (client) return adaptChatManager(client); + // No truapi host: fall back to the legacy native chat backend when present, + // so chat products keep working on the native backend during the transition. + // The novasama wrapper is loaded on demand so truapi-only products never + // bundle it. + if (isNativeChatHost()) return getNativeChatManager(); + return null; } if (import.meta.vitest) { diff --git a/product-sdk/packages/host/src/nativeChat.ts b/product-sdk/packages/host/src/nativeChat.ts new file mode 100644 index 00000000..fa59edb8 --- /dev/null +++ b/product-sdk/packages/host/src/nativeChat.ts @@ -0,0 +1,383 @@ +// Copyright 2026 Parity Technologies (UK) Ltd. +// SPDX-License-Identifier: Apache-2.0 +/** + * Native-backend chat adapter. + * + * The iOS "native backend" chat runtime speaks the legacy novasama container + * protocol, not truapi/SCALE. `@novasamatech/host-api-wrapper`'s + * `createProductChatManager()` already implements that protocol and its public + * surface is structurally the product-sdk {@link ChatManager}. This adapter + * exposes it under the unified interface so chat products keep working on the + * native backend during the transition, the way non-chat SPA (single-page app) + * products already keep a native adapter alongside the truapi one. + * + * The truapi and novasama TS shapes for the same wire data diverge in three + * places, each translated explicitly (never a blind cast): + * + * - the custom-renderer node — see {@link toNovasamaNode} (product-sdk/react + * shape → novasama shape); + * - `ChatMessageContent` — `Text` is `{ text }` on truapi but a bare string on + * novasama, and `Custom.payload` is a hex string on truapi but `Uint8Array` + * on novasama (see {@link toNovaMessageContent}/{@link fromNovaMessageContent}); + * - `ActionTriggered.payload` — hex string on truapi, `Uint8Array` on novasama. + * + * Room/bot registration and room-list payloads are field-identical and pass + * through unchanged. + * + * `@novasamatech/host-api-wrapper` is loaded via a dynamic `import()` from + * {@link getNativeChatManager} so truapi-only products never pull the legacy + * novasama tree into their bundle. + * + * @module + */ +import type { ChatMessageContent } from "@parity/truapi"; + +import type { + ChatManager, + ChatCustomMessageRenderingRegistration, + ChatCustomMessageRenderingRequestHandler, + ChatReceivedAction, +} from "./chat.js"; +import { fromHex, toHex } from "./truapi.js"; +import { toNovasamaNode } from "./nativeChatNode.js"; +import type { HostSubscription } from "./types.js"; + +type Any = any; + +/** Minimal shape of `createProductChatManager()`'s return that we consume. */ +interface NativeChatBackend { + registerRoom(params: { roomId: string; name: string; icon: string }): Promise<"New" | "Exists">; + registerBot(params: { botId: string; name: string; icon: string }): Promise<"New" | "Exists">; + sendMessage(roomId: string, payload: Any): Promise<{ messageId: string }>; + subscribeChatList(callback: (rooms: Any[]) => void): NovaSubscription; + subscribeAction(callback: (action: Any) => void): NovaSubscription; + onCustomMessageRenderingRequest( + renderer: ( + params: { + messageId: string; + messageType: string; + payload: Uint8Array; + subscribeActions: Any; + }, + render: (node: Any) => void, + ) => VoidFunction, + ): VoidFunction; +} + +/** A novasama `Subscription`: unsubscribe plus an interrupt hook. */ +interface NovaSubscription { + unsubscribe(): void; + onInterrupt?(callback: (reason?: unknown) => void): () => void; +} + +/** + * Detect the legacy native chat host. The native container injects + * `webkit.messageHandlers.__container__` (see the iOS `ContainerBridge`); its + * presence — with no truapi host — means we're on the native backend. + */ +export function isNativeChatHost(): boolean { + const handlers = (globalThis as Any)?.webkit?.messageHandlers; + return typeof handlers?.__container__?.postMessage === "function"; +} + +/** truapi `ChatMessageContent` → the novasama wire shape. */ +function toNovaMessageContent(content: ChatMessageContent): Any { + switch (content.tag) { + case "Text": + // truapi `{ text }` → novasama bare string. + return { tag: "Text", value: content.value.text }; + case "Custom": + // truapi hex payload → novasama bytes. + return { + tag: "Custom", + value: { + messageType: content.value.messageType, + payload: fromHex(content.value.payload), + }, + }; + // The other variants (RichText/Actions/File/Reaction/ReactionRemoved) + // are field-identical between the stacks and forwarded unchanged. + default: + return content; + } +} + +/** novasama `ChatMessageContent` → the truapi shape product code expects. */ +function fromNovaMessageContent(content: Any): Any { + switch (content.tag) { + case "Text": + return { tag: "Text", value: { text: content.value } }; + case "Custom": + return { + tag: "Custom", + value: { + messageType: content.value.messageType, + payload: toHex(content.value.payload), + }, + }; + default: + return content; + } +} + +/** novasama received action → the truapi `ChatReceivedAction` shape. */ +function fromNovaAction(action: Any): ChatReceivedAction { + const payload = action.payload; + if (payload?.tag === "MessagePosted") { + return { + ...action, + payload: { tag: "MessagePosted", value: fromNovaMessageContent(payload.value) }, + }; + } + if (payload?.tag === "ActionTriggered") { + const t = payload.value; + return { + ...action, + payload: { + tag: "ActionTriggered", + value: { ...t, payload: t.payload === undefined ? undefined : toHex(t.payload) }, + }, + }; + } + return action; +} + +/** Adapt a novasama subscription to the host's {@link HostSubscription}. */ +function adaptSubscription(sub: NovaSubscription): HostSubscription { + return { + unsubscribe: () => sub.unsubscribe(), + onInterrupt: (callback) => sub.onInterrupt?.(callback) ?? (() => {}), + }; +} + +/** + * Build a {@link ChatManager} over a novasama native chat backend. The backend + * is injected (production supplies `createProductChatManager()`; tests supply a + * fake), so this module carries no static novasama import. + */ +export function createNativeChatManager(backend: NativeChatBackend): ChatManager { + return { + registerRoom(request) { + return backend.registerRoom(request); + }, + registerBot(request) { + return backend.registerBot(request); + }, + sendMessage(roomId, payload) { + return backend.sendMessage(roomId, toNovaMessageContent(payload)); + }, + subscribeChatList(callback) { + return adaptSubscription(backend.subscribeChatList((rooms) => callback(rooms))); + }, + subscribeAction(callback) { + return adaptSubscription( + backend.subscribeAction((action) => callback(fromNovaAction(action))), + ); + }, + onCustomMessageRenderingRequest( + handler: ChatCustomMessageRenderingRequestHandler, + ): ChatCustomMessageRenderingRegistration { + // The product-sdk handler is host-initiated (returns an observable of + // truapi nodes); the novasama backend wants a `(params, render)` + // callback. Bridge the two, translating each emitted node into the + // novasama shape its codec can encode. + const dispose = backend.onCustomMessageRenderingRequest((params, render) => { + const source = handler({ + messageId: params.messageId, + messageType: params.messageType, + payload: params.payload, + subscribeActions: params.subscribeActions, + }); + const subscription = source.subscribe({ + next: (node) => render(toNovasamaNode(node)), + // The native render callback has no failure channel (unlike + // the truapi host-initiated stream, which interrupts), so a + // renderer error can only be dropped here — it just stops + // producing further trees. + error: () => {}, + }); + return () => subscription.unsubscribe(); + }); + return { unsubscribe: dispose }; + }, + }; +} + +/** + * Get a native-backend {@link ChatManager}, loading the novasama wrapper on + * demand. Called by {@link getChatManager} only when {@link isNativeChatHost}. + */ +export async function getNativeChatManager(): Promise { + const { createProductChatManager } = await import("@novasamatech/host-api-wrapper"); + return createNativeChatManager(createProductChatManager() as unknown as NativeChatBackend); +} + +if (import.meta.vitest) { + const { describe, it, expect, vi } = import.meta.vitest; + + // Fake novasama backend (the public shape of `createProductChatManager()`), + // recording what the adapter forwards and letting tests drive inbound + // actions and render requests the way the native container does. + const makeFakeBackend = () => { + const sent: Array<{ roomId: string; payload: Any }> = []; + let actionCb: ((action: Any) => void) | undefined; + let renderer: ((params: Any, render: (node: Any) => void) => VoidFunction) | undefined; + let interruptCb: ((reason?: unknown) => void) | undefined; + + const backend: NativeChatBackend = { + async registerRoom() { + return "New"; + }, + async registerBot() { + return "New"; + }, + async sendMessage(roomId: string, payload: Any) { + sent.push({ roomId, payload }); + return { messageId: `m-${sent.length}` }; + }, + subscribeChatList() { + return { unsubscribe() {} }; + }, + subscribeAction(cb: (action: Any) => void) { + actionCb = cb; + return { + unsubscribe() {}, + onInterrupt(cb2: (reason?: unknown) => void) { + interruptCb = cb2; + return () => {}; + }, + }; + }, + onCustomMessageRenderingRequest( + r: (params: Any, render: (node: Any) => void) => VoidFunction, + ) { + renderer = r; + return () => {}; + }, + }; + + return { + backend, + sent, + emitAction: (action: Any) => actionCb?.(action), + fireInterrupt: (reason?: unknown) => interruptCb?.(reason), + driveRender: (params: Any) => { + const nodes: Any[] = []; + renderer!(params, (n) => nodes.push(n)); + return { nodes }; + }, + }; + }; + + describe("createNativeChatManager — message content translation", () => { + it("sendMessage: truapi Text {text} → novasama bare string", async () => { + const f = makeFakeBackend(); + const chat = createNativeChatManager(f.backend); + const res = await chat.sendMessage("room", { + tag: "Text", + value: { text: "hi" }, + } as Any); + expect(res.messageId).toBe("m-1"); + expect(f.sent[0]!.payload).toEqual({ tag: "Text", value: "hi" }); + }); + + it("sendMessage: truapi Custom hex payload → novasama Uint8Array", async () => { + const f = makeFakeBackend(); + const chat = createNativeChatManager(f.backend); + await chat.sendMessage("room", { + tag: "Custom", + value: { messageType: "result", payload: "0xdead" }, + } as Any); + const out = f.sent[0]!.payload; + expect(out.tag).toBe("Custom"); + expect(out.value.messageType).toBe("result"); + expect(Array.from(out.value.payload as Uint8Array)).toEqual([0xde, 0xad]); + }); + + it("subscribeAction: novasama bare-string Text → truapi {text}", () => { + const f = makeFakeBackend(); + const chat = createNativeChatManager(f.backend); + const received: Any[] = []; + chat.subscribeAction((a) => received.push(a)); + f.emitAction({ + roomId: "r", + peer: "p", + payload: { tag: "MessagePosted", value: { tag: "Text", value: "yo" } }, + }); + expect(received[0].payload.value).toEqual({ tag: "Text", value: { text: "yo" } }); + }); + + it("subscribeAction: novasama ActionTriggered Uint8Array payload → truapi hex", () => { + const f = makeFakeBackend(); + const chat = createNativeChatManager(f.backend); + const received: Any[] = []; + chat.subscribeAction((a) => received.push(a)); + f.emitAction({ + roomId: "r", + peer: "p", + payload: { + tag: "ActionTriggered", + value: { messageId: "m1", actionId: "a1", payload: new Uint8Array([1, 2]) }, + }, + }); + expect(received[0].payload.value.payload).toBe("0x0102"); + }); + }); + + describe("createNativeChatManager — render bridge & lifecycle", () => { + it("runs the product renderer and translates emitted nodes to the novasama shape", () => { + const f = makeFakeBackend(); + const chat = createNativeChatManager(f.backend); + + chat.onCustomMessageRenderingRequest(() => ({ + subscribe(observer: Any) { + observer.next?.({ + tag: "Text", + value: { + modifiers: [], + props: { style: "HeadlineLarge", color: "FgPrimary" }, + children: [{ tag: "String", value: { text: "hi" } }], + }, + }); + return { unsubscribe() {} }; + }, + })); + + const { nodes } = f.driveRender({ + messageId: "m1", + messageType: "t", + payload: new Uint8Array(), + subscribeActions: () => () => {}, + }); + expect(nodes[0].value.props).toEqual({ style: "headline.large", color: "fg.primary" }); + expect(nodes[0].value.children[0]).toEqual({ tag: "String", value: "hi" }); + }); + + it("forwards the backend interrupt hook (not a no-op)", () => { + const f = makeFakeBackend(); + const chat = createNativeChatManager(f.backend); + const sub = chat.subscribeAction(() => {}); + const onInterrupt = vi.fn(); + sub.onInterrupt(onInterrupt); + f.fireInterrupt("gone"); + expect(onInterrupt).toHaveBeenCalledWith("gone"); + }); + }); + + describe("isNativeChatHost", () => { + it("is false without a container global", () => { + expect(isNativeChatHost()).toBe(false); + }); + + it("is true when webkit.messageHandlers.__container__ is present", () => { + (globalThis as Any).webkit = { + messageHandlers: { __container__: { postMessage() {} } }, + }; + try { + expect(isNativeChatHost()).toBe(true); + } finally { + (globalThis as Any).webkit = undefined; + } + }); + }); +} diff --git a/product-sdk/packages/host/src/nativeChatNode.ts b/product-sdk/packages/host/src/nativeChatNode.ts new file mode 100644 index 00000000..3513122b --- /dev/null +++ b/product-sdk/packages/host/src/nativeChatNode.ts @@ -0,0 +1,439 @@ +// Copyright 2026 Parity Technologies (UK) Ltd. +// SPDX-License-Identifier: Apache-2.0 +/** + * Translate a truapi-shaped `CustomRendererNode` (what + * `@parity/product-sdk-react-renderer` emits) into the novasama-shaped node the + * legacy native chat backend's codec expects. + * + * The structural transforms invert the renderer's serializer: + * - modifier tags: `Margin` → `margin`; + * - `Width`/`Height`/`MinWidth`/`MinHeight` values: `{ width }` / `{ height }` → bare `Size`; + * - `FillWidth`/`FillHeight` values: `{ enabled }` → bare `boolean`; + * - `Dimensions`: struct `{ top, end, bottom?, start? }` → tuple `[top, end, bottom?, start?]`; + * - `String` node: `{ text }` → bare string; + * - `Shape` `Rounded`: `{ radius }` → bare `Size`. + * + * Enum values additionally need casing translation (`FgPrimary` → `fg.primary`), + * which the serializer does not do — truapi carries PascalCase tokens, novasama + * dotted/camel ones. The tables below are that vocabulary; there is no shared + * source (novasama is only loaded via a dynamic import, and truapi's codecs are + * index-based SCALE enums that don't expose their member strings). `map()` + * throws on any defined value missing from its table, so a future truapi enum + * addition fails loudly instead of shipping an un-encodable value. + * + * @module + */ + +type Any = any; + +const COLOR: Record = { + FgPrimary: "fg.primary", + FgSecondary: "fg.secondary", + FgTertiary: "fg.tertiary", + BgSurfaceMain: "bg.surface.main", + BgSurfaceContainer: "bg.surface.container", + BgSurfaceNested: "bg.surface.nested", + FgSuccess: "fg.success", + FgError: "fg.error", + FgWarning: "fg.warning", +}; +const TYPOGRAPHY: Record = { + HeadlineLarge: "headline.large", + TitleMediumRegular: "title.medium.regular", + BodyLargeRegular: "body.large.regular", + BodyMediumRegular: "body.medium.regular", + BodySmallRegular: "body.small.regular", +}; +const BUTTON_VARIANT: Record = { + Primary: "primary", + Secondary: "secondary", + Text: "text", +}; +const CONTENT_ALIGNMENT: Record = { + TopStart: "topStart", + TopCenter: "topCenter", + TopEnd: "topEnd", + CenterStart: "centerStart", + Center: "center", + CenterEnd: "centerEnd", + BottomStart: "bottomStart", + BottomCenter: "bottomCenter", + BottomEnd: "bottomEnd", +}; +const H_ALIGN: Record = { Start: "start", Center: "center", End: "end" }; +const V_ALIGN: Record = { Top: "top", Center: "center", Bottom: "bottom" }; +const ARRANGEMENT: Record = { + Start: "start", + End: "end", + Center: "center", + SpaceBetween: "spaceBetween", + SpaceAround: "spaceAround", + SpaceEvenly: "spaceEvenly", +}; +const MODIFIER_TAG: Record = { + Margin: "margin", + Padding: "padding", + Background: "background", + Border: "border", + Width: "width", + Height: "height", + MinWidth: "minWidth", + MinHeight: "minHeight", + FillWidth: "fillWidth", + FillHeight: "fillHeight", +}; + +/** + * Map a truapi enum value to its novasama equivalent. An absent optional prop + * (`undefined`) passes through; a defined string missing from the table is a + * real gap (e.g. truapi added an enum variant) and throws loudly rather than + * shipping an un-encodable value to the novasama codec. + */ +const map = (table: Record, value: unknown): unknown => { + if (value === undefined) return value; + if (typeof value === "string" && value in table) return table[value]; + throw new Error(`nativeChatNode: unmapped enum value ${JSON.stringify(value)}`); +}; + +/** Struct `Dimensions` → tuple `[top, end, bottom?, start?]`. */ +function toNovaDimensions(d: Any): Any { + return [d.top, d.end, d.bottom, d.start]; +} + +/** truapi `Shape` → novasama `Shape` (`Rounded` value `{ radius }` → bare). */ +function toNovaShape(shape: Any): Any { + if (!shape) return shape; + return shape.tag === "Rounded" ? { tag: "Rounded", value: shape.value.radius } : shape; +} + +function toNovaBackground(bg: Any): Any { + // The serializer always wraps `background` as `{ color, shape? }`. + return { color: map(COLOR, bg.color), shape: toNovaShape(bg.shape) }; +} + +function toNovaModifier(mod: Any): Any { + const tag = MODIFIER_TAG[mod.tag]; + switch (mod.tag) { + case "Margin": + case "Padding": + return { tag, value: toNovaDimensions(mod.value) }; + case "Width": + case "MinWidth": + return { tag, value: mod.value.width }; + case "Height": + case "MinHeight": + return { tag, value: mod.value.height }; + case "FillWidth": + case "FillHeight": + return { tag, value: mod.value.enabled }; + case "Background": + return { tag, value: toNovaBackground(mod.value) }; + case "Border": + return { + tag, + value: { + width: mod.value.width, + color: map(COLOR, mod.value.color), + shape: toNovaShape(mod.value.shape), + }, + }; + default: + // truapi's `Modifier` union is closed; an unknown tag means the + // union grew and this translator wasn't updated — fail loudly. + throw new Error(`nativeChatNode: unmapped modifier tag ${JSON.stringify(mod.tag)}`); + } +} + +function toNovaProps(nodeTag: string, props: Any): Any { + if (!props) return props; + switch (nodeTag) { + case "Box": + return { contentAlignment: map(CONTENT_ALIGNMENT, props.contentAlignment) }; + case "Column": + return { + horizontalAlignment: map(H_ALIGN, props.horizontalAlignment), + verticalArrangement: map(ARRANGEMENT, props.verticalArrangement), + }; + case "Row": + return { + verticalAlignment: map(V_ALIGN, props.verticalAlignment), + horizontalArrangement: map(ARRANGEMENT, props.horizontalArrangement), + }; + case "Text": + return { style: map(TYPOGRAPHY, props.style), color: map(COLOR, props.color) }; + case "Button": + return { ...props, variant: map(BUTTON_VARIANT, props.variant) }; + // Spacer (undefined props, caught above) and TextField (no enum tokens) + // carry over unchanged. + default: + return props; + } +} + +/** Translate a truapi `CustomRendererNode` into the novasama node shape. */ +export function toNovasamaNode(node: Any): Any { + if (node.tag === "String") { + return { tag: "String", value: node.value.text }; + } + if (node.tag === "Nil") { + return node; + } + const component = node.value; + return { + tag: node.tag, + value: { + modifiers: (component.modifiers ?? []).map(toNovaModifier), + props: toNovaProps(node.tag, component.props), + children: (component.children ?? []).map(toNovasamaNode), + }, + }; +} + +if (import.meta.vitest) { + const { describe, it, expect } = import.meta.vitest; + + describe("toNovasamaNode", () => { + it("unwraps String nodes to a bare string", () => { + expect(toNovasamaNode({ tag: "String", value: { text: "hi" } })).toEqual({ + tag: "String", + value: "hi", + }); + }); + + it("passes Nil through", () => { + expect(toNovasamaNode({ tag: "Nil", value: undefined })).toEqual({ + tag: "Nil", + value: undefined, + }); + }); + + it("maps Button variant and keeps other props", () => { + const out = toNovasamaNode({ + tag: "Button", + value: { + modifiers: [], + props: { + text: "Go", + variant: "Primary", + enabled: true, + loading: false, + clickAction: "a1", + }, + children: [], + }, + }); + expect(out.value.props).toEqual({ + text: "Go", + variant: "primary", + enabled: true, + loading: false, + clickAction: "a1", + }); + }); + + it("maps Column/Row alignment + arrangement enums", () => { + const col = toNovasamaNode({ + tag: "Column", + value: { + modifiers: [], + props: { horizontalAlignment: "Center", verticalArrangement: "SpaceBetween" }, + children: [], + }, + }); + expect(col.value.props).toEqual({ + horizontalAlignment: "center", + verticalArrangement: "spaceBetween", + }); + + const row = toNovasamaNode({ + tag: "Row", + value: { + modifiers: [], + props: { verticalAlignment: "Bottom", horizontalArrangement: "SpaceEvenly" }, + children: [], + }, + }); + expect(row.value.props).toEqual({ + verticalAlignment: "bottom", + horizontalArrangement: "spaceEvenly", + }); + }); + + it("converts modifier tags, struct Dimensions → tuple, and unwrapped values", () => { + const mods = [ + { tag: "Padding", value: { top: 8, end: 8 } }, + { tag: "Margin", value: { top: 1, end: 2, bottom: 3, start: 4 } }, + { tag: "Width", value: { width: 100 } }, + { tag: "MinHeight", value: { height: 20 } }, + { tag: "FillWidth", value: { enabled: true } }, + ]; + const out = toNovasamaNode({ + tag: "Spacer", + value: { modifiers: mods, props: undefined, children: [] }, + }); + expect(out.value.modifiers).toEqual([ + { tag: "padding", value: [8, 8, undefined, undefined] }, + { tag: "margin", value: [1, 2, 3, 4] }, + { tag: "width", value: 100 }, + { tag: "minHeight", value: 20 }, + { tag: "fillWidth", value: true }, + ]); + }); + + it("translates Background + Border colors and Shape.Rounded radius", () => { + const out = toNovasamaNode({ + tag: "Box", + value: { + modifiers: [ + { + tag: "Background", + value: { + color: "BgSurfaceContainer", + shape: { tag: "Rounded", value: { radius: 10 } }, + }, + }, + { + tag: "Border", + value: { + width: 1, + color: "FgTertiary", + shape: { tag: "Circle", value: undefined }, + }, + }, + ], + props: { contentAlignment: "Center" }, + children: [], + }, + }); + expect(out.value.modifiers).toEqual([ + { + tag: "background", + value: { color: "bg.surface.container", shape: { tag: "Rounded", value: 10 } }, + }, + { + tag: "border", + value: { + width: 1, + color: "fg.tertiary", + shape: { tag: "Circle", value: undefined }, + }, + }, + ]); + }); + + it("recurses into children (full coin-flip-style tree)", () => { + const tree = { + tag: "Column", + value: { + modifiers: [{ tag: "Padding", value: { top: 10, end: 10 } }], + props: { horizontalAlignment: "Center", verticalArrangement: "Center" }, + children: [ + { + tag: "Text", + value: { + modifiers: [], + props: { style: "BodySmallRegular", color: "FgPrimary" }, + children: [{ tag: "String", value: { text: "Flip #1" } }], + }, + }, + { + tag: "Text", + value: { + modifiers: [], + props: { style: "HeadlineLarge" }, + children: [{ tag: "String", value: { text: "HEADS" } }], + }, + }, + ], + }, + }; + const out = toNovasamaNode(tree) as Any; + expect(out.value.modifiers[0]).toEqual({ + tag: "padding", + value: [10, 10, undefined, undefined], + }); + expect(out.value.props.horizontalAlignment).toBe("center"); + expect(out.value.children[0].value.props).toEqual({ + style: "body.small.regular", + color: "fg.primary", + }); + expect(out.value.children[0].value.children[0]).toEqual({ + tag: "String", + value: "Flip #1", + }); + expect(out.value.children[1].value.children[0]).toEqual({ + tag: "String", + value: "HEADS", + }); + }); + + // Exhaustive per-enum coverage: every truapi value maps to the exact + // novasama string its codec accepts. Guards against a drifted table. + const cases: Array< + [string, Record, (v: string) => Any, (out: Any) => unknown] + > = [ + [ + "ColorToken", + COLOR, + (v) => ({ + tag: "Text", + value: { modifiers: [], props: { color: v }, children: [] }, + }), + (o) => o.value.props.color, + ], + [ + "TypographyStyle", + TYPOGRAPHY, + (v) => ({ + tag: "Text", + value: { modifiers: [], props: { style: v }, children: [] }, + }), + (o) => o.value.props.style, + ], + [ + "ButtonVariant", + BUTTON_VARIANT, + (v) => ({ + tag: "Button", + value: { modifiers: [], props: { text: "x", variant: v }, children: [] }, + }), + (o) => o.value.props.variant, + ], + [ + "Arrangement", + ARRANGEMENT, + (v) => ({ + tag: "Column", + value: { modifiers: [], props: { verticalArrangement: v }, children: [] }, + }), + (o) => o.value.props.verticalArrangement, + ], + [ + "ContentAlignment", + CONTENT_ALIGNMENT, + (v) => ({ + tag: "Box", + value: { modifiers: [], props: { contentAlignment: v }, children: [] }, + }), + (o) => o.value.props.contentAlignment, + ], + ]; + + for (const [name, table, build, read] of cases) { + it(`${name}: every value maps to its novasama equivalent`, () => { + for (const [truapi, nova] of Object.entries(table)) { + expect(read(toNovasamaNode(build(truapi)))).toBe(nova); + } + }); + } + + it("throws on an unmapped enum value (e.g. a new truapi variant)", () => { + expect(() => + toNovasamaNode({ + tag: "Text", + value: { modifiers: [], props: { color: "FgNeon" }, children: [] }, + }), + ).toThrow(/unmapped enum value/); + }); + }); +} diff --git a/product-sdk/pnpm-lock.yaml b/product-sdk/pnpm-lock.yaml index 29b4bca7..62677457 100644 --- a/product-sdk/pnpm-lock.yaml +++ b/product-sdk/pnpm-lock.yaml @@ -524,6 +524,9 @@ importers: packages/host: dependencies: + '@novasamatech/host-api-wrapper': + specifier: 0.9.2 + version: 0.9.2(@polkadot/api@16.5.6)(@polkadot/util@14.0.3)(esbuild@0.28.1)(rxjs@7.8.2) '@parity/product-sdk-errors': specifier: workspace:* version: link:../errors @@ -1636,15 +1639,24 @@ packages: resolution: {integrity: sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==} engines: {node: '>= 8'} + '@novasamatech/host-api-wrapper@0.9.2': + resolution: {integrity: sha512-LzSp7HgfUHMqho16aqZKiwUNfYVvr/wjcgp7uoiF8Akka5F5a6fIVLiJezeQPPMyCURfu771Sm0jGdFEpJ4HLg==} + '@novasamatech/host-api@0.8.9': resolution: {integrity: sha512-KPh81iVv3sQckq7/oyRpFF2uYBPXJD0+7cRuXO+lnWPAxQBXK1aNUQzSq+vJUHkcGRXJd0up/IlHJ4DMfQyUhQ==} + '@novasamatech/host-api@0.9.2': + resolution: {integrity: sha512-jxgzPjsFCRKGwCUuNskIxgBU3AewlzJkWzij+lspBV57e5UdtN0NHiy6floj0DQhJVIY9n4oybTtHFbkfSiOmA==} + '@novasamatech/host-papp@0.8.9': resolution: {integrity: sha512-Z1iENq/nn3e1P/4Mj0SS98yqO7tD8841G3xNGqO+O7tSnEjxDY4keS4uy4Rhx5hYIIRcUxe3xe1g/kUbJWVa+g==} '@novasamatech/scale@0.8.9': resolution: {integrity: sha512-/Gt0KwfdkQZGyqd7e8YApx/QPMj/WDFrFYYOW5qxNWlbDpSUmYqNX+D1LECSokXw1vqE2m+ydBmNsAwyhJCLuQ==} + '@novasamatech/scale@0.9.2': + resolution: {integrity: sha512-3auVV4yNdjYJwTHkruphG/AYrpXRsMaQLLr9f5sgmSHvIXNkbZwrZWnPariuiGkCiiQnton2+CESCv52/LDdlg==} + '@novasamatech/sdk-statement@0.6.0': resolution: {integrity: sha512-NTqM+yS45iHgy87lVSWIpFozrTfCUWb7r4ZpsDtN1eFnfixXpDKpPXDWQsvPs+nh18r/jmoMgtlTjUltrS6mYQ==} @@ -1690,6 +1702,9 @@ packages: '@polkadot-api/ink-contracts@0.6.3': resolution: {integrity: sha512-XqnM1VDzI5L62xgg+f8le2yEoz8QZbUKEfAfPnHMOgBj9tJiyF15FcOJmnLMO/vq3cGixqh18tzJekLG5YTxtA==} + '@polkadot-api/json-rpc-provider-proxy@0.1.0': + resolution: {integrity: sha512-8GSFE5+EF73MCuLQm8tjrbCqlgclcHBSRaswvXziJ0ZW7iw3UEMsKkkKvELayWyBuOPa2T5i1nj6gFOeIsqvrg==} + '@polkadot-api/json-rpc-provider-proxy@0.4.0': resolution: {integrity: sha512-h+ay62wwj4y+PJ/JiZ8o54il9UYsgBxq1dxas8mN1Ybth1QxxYPxWvkhyswBNQuWBZIWJw5p3X9cGQku+LvaWQ==} @@ -1708,6 +1723,9 @@ packages: '@polkadot-api/metadata-builders@0.14.3': resolution: {integrity: sha512-m7CACsiqHzgVEh5WBZGkTV8AQ3CBQKR1YpPQMnlsJfCr/IkgKU0UyWM6WxCmBiReLFVkOfXMtGlpN8+GxpHmww==} + '@polkadot-api/metadata-builders@0.3.2': + resolution: {integrity: sha512-TKpfoT6vTb+513KDzMBTfCb/ORdgRnsS3TDFpOhAhZ08ikvK+hjHMt5plPiAX/OWkm1Wc9I3+K6W0hX5Ab7MVg==} + '@polkadot-api/metadata-compatibility@0.6.3': resolution: {integrity: sha512-/Y0uF8nDk60ijydp8Bd37YexPFdB8hBXJWwEgOJHsVlhiny8sVKXiMg+UkJ9BiEk2z+yMbZRCKmhNpTpizo7aw==} @@ -1716,6 +1734,12 @@ packages: peerDependencies: rxjs: '>=7.8.0' + '@polkadot-api/observable-client@0.3.2': + resolution: {integrity: sha512-HGgqWgEutVyOBXoGOPp4+IAq6CNdK/3MfQJmhCJb8YaJiaK4W6aRGrdQuQSTPHfERHCARt9BrOmEvTXAT257Ug==} + peerDependencies: + '@polkadot-api/substrate-client': 0.1.4 + rxjs: '>=7.8.0' + '@polkadot-api/pjs-signer@0.7.3': resolution: {integrity: sha512-U7BLFZfnpFMxCh/scJoLXT6oSbfZtZgMTkiu+TbuWQljAb/1ttrQOfshub5VihNyD5rHajp/2Fq0ONZoL5N5PA==} @@ -1745,9 +1769,18 @@ packages: '@polkadot-api/substrate-bindings@0.20.3': resolution: {integrity: sha512-9iqC71fx1ee9ld1NZV8PFime5vryi0kt1bKCSlvNgO6dqMc06sMZuZ8WPjOzWLCHiKHLuphdMs3rVBBaeCP3yg==} + '@polkadot-api/substrate-bindings@0.6.0': + resolution: {integrity: sha512-lGuhE74NA1/PqdN7fKFdE5C1gNYX357j1tWzdlPXI0kQ7h3kN0zfxNOpPUN7dIrPcOFZ6C0tRRVrBylXkI6xPw==} + + '@polkadot-api/substrate-client@0.1.4': + resolution: {integrity: sha512-MljrPobN0ZWTpn++da9vOvt+Ex+NlqTlr/XT7zi9sqPtDJiQcYl+d29hFAgpaeTqbeQKZwz3WDE9xcEfLE8c5A==} + '@polkadot-api/substrate-client@0.7.0': resolution: {integrity: sha512-TWCc4MAMa5SLVQXmomLHknbj+bztQ/Yclgwm8ENBhz8hR7c9rw9FBAkCa02jMBMCAygPhp3ayGRq+UFcF8KIxQ==} + '@polkadot-api/utils@0.1.0': + resolution: {integrity: sha512-MXzWZeuGxKizPx2Xf/47wx9sr/uxKw39bVJUptTJdsaQn/TGq+z310mHzf1RCGvC1diHM8f593KrnDgc9oNbJA==} + '@polkadot-api/utils@0.4.0': resolution: {integrity: sha512-9b/hwRM0UloLWV7SfpNaSD/4k8UQAHoaACAk7Xe+1MlfAm2JtnmPiB1GfGrfTyBlsrJVUIBCZpEmbmxVMaIqBA==} @@ -1776,6 +1809,156 @@ packages: '@polkadot-labs/schnorrkel-wasm@0.0.9': resolution: {integrity: sha512-MWO28z29OgKihdXjybvbuECASAIu52KZfBMFNZtK7jeyoFvA8ZrpJzYxPgFaBIsk1hHM488q7EXHckaMnZ1xng==} + '@polkadot/api-augment@16.5.6': + resolution: {integrity: sha512-bunJF1c3nIuDtU6iwa+reTt9U47Y8iOC8Gw7PfANlZmLJmO/XVXnWc3JJLM+g9ESDn2raHJELeWBFVOXQrbtUw==} + engines: {node: '>=18'} + + '@polkadot/api-base@16.5.6': + resolution: {integrity: sha512-eBLIv86ZZY4t5OrobVoGC+QXbErOGlBpI2rJI5OMvTNPoVvtEoI++u+wwRScjkOZaUhXyQikd+0Uv71qr3xnsA==} + engines: {node: '>=18'} + + '@polkadot/api-derive@16.5.6': + resolution: {integrity: sha512-cHdvPvhYFch18uPTcuOZJ8VceOfercod2fi4xCnHJAmattzlgj9qCgnOoxdmBS9GZ403ZyRHOjBuUwZy/IsUWQ==} + engines: {node: '>=18'} + + '@polkadot/api@16.5.6': + resolution: {integrity: sha512-5h/X3pY8WpqGk4XTaiIUjKD6Pnk8k4bJ6EIwPKLP8/kfFWKSOenpN6ggZxANr+Qj+RgXrp4TxJVcuhXSiBh9Sg==} + engines: {node: '>=18'} + + '@polkadot/extension-inject@0.63.1': + resolution: {integrity: sha512-C8xOP9ixgNnvjEDYFxGVCFPBlGX7nXNYjeDK1WH1bRvnh6FCv5J4IMS3MvMadQErYrrhcqz1zQy8MR3iLQZpEg==} + engines: {node: '>=18'} + peerDependencies: + '@polkadot/api': '*' + '@polkadot/util': '*' + + '@polkadot/keyring@14.0.3': + resolution: {integrity: sha512-ozp1dQwaHCjgX/fpTTORmHjxdUNQnyiTVJszpzUaUpvtH/IGZhSU/mSHXMqNETS/g57vQa7NatIDcWfyR9abyA==} + engines: {node: '>=18'} + peerDependencies: + '@polkadot/util': 14.0.3 + '@polkadot/util-crypto': 14.0.3 + + '@polkadot/networks@14.0.3': + resolution: {integrity: sha512-/VqTLUDn+Wm8S2L/yaGFddo3oW4vRYav0Rg4pLg/semMZLaN8PJ6h927ucn9JyWdH82QfZfyiIPORt0ZF3isyw==} + engines: {node: '>=18'} + + '@polkadot/rpc-augment@16.5.6': + resolution: {integrity: sha512-vlrNvl2VtU09jZV/AvH7jBb/cNUO+dWu8Xj9pId5ctSUnZHm8o8wRk9ekyieKP57OUoKMd8+VScwMKd624SxTw==} + engines: {node: '>=18'} + + '@polkadot/rpc-core@16.5.6': + resolution: {integrity: sha512-l6od++WlvKH4mw5mtsIh2AhiBs3H+TtdOoUHVLCx/R9il7+gl+arltzZ8vBuffyh/O+uQ36lI8yUoD1g4gi1tA==} + engines: {node: '>=18'} + + '@polkadot/rpc-provider@16.5.6': + resolution: {integrity: sha512-46sHIjKYr4aSzBCfbyqtCwuP8MMJ3jOp0xx9eggOGbKyP8Z0j0Cp+1nNkZUYzehcdGjjrmCxCbQp17wc6cj4zA==} + engines: {node: '>=18'} + + '@polkadot/types-augment@16.5.6': + resolution: {integrity: sha512-QN5UrluUZCVgknUDW0gps/FRQ13Qgm24w53pCd2HgD0nmTtXDt9D4psjWwx5JkGTkUAvpzFWwN41bkxAeCiV6g==} + engines: {node: '>=18'} + + '@polkadot/types-codec@16.5.6': + resolution: {integrity: sha512-3tzUv1LZOL97IlQmko4dqbfRC0cg9IQ2QAHRVoDIWsXrVovp1V3kPdP0o6e3I8T2XB9IlbabK91v+ZiIxhGMZw==} + engines: {node: '>=18'} + + '@polkadot/types-create@16.5.6': + resolution: {integrity: sha512-g7g3hrjpz4KgqQqei9PU0JY9fsFHBmThWALZk5pWB32vyDyDcXZiyhH3agDhqfmzQiolTW2FuvcNJxgS634J1w==} + engines: {node: '>=18'} + + '@polkadot/types-known@16.5.6': + resolution: {integrity: sha512-c78NcVO3LIvi4xzxB39WewE+80I4jOYUtPBaB4AzSMespEwIr92VTeX3KzFWuutxDXLSPqeVfXhaAhBB0NssiQ==} + engines: {node: '>=18'} + + '@polkadot/types-support@16.5.6': + resolution: {integrity: sha512-Hqpa/hCvXZXUTUiJMAE55UXpzAeCVLaFlzzXQXLkne0vhmv3/JkWcBnX755a/b9+C4b3MKEz2i0tSKLsa3DldA==} + engines: {node: '>=18'} + + '@polkadot/types@16.5.6': + resolution: {integrity: sha512-X/sfMHJS4RkRhnsc4CQqzUy7BM/s2y71TrBFHPYAjs2q/rbZ/BwvBk70SrUiSa0+iRRn3RewbBZm+AB8CbkdKw==} + engines: {node: '>=18'} + + '@polkadot/util-crypto@14.0.3': + resolution: {integrity: sha512-V00BI6XnZLCkrAmV8uN0eSB6fy48CkxdDZT29cgSMSwHPtY6oKUNgd1ST07PGCL5x8XflwjoA7CTlhdbp1Y9gw==} + engines: {node: '>=18'} + peerDependencies: + '@polkadot/util': 14.0.3 + + '@polkadot/util@14.0.3': + resolution: {integrity: sha512-mg1NR7ixHlNiz2zbvdcdy1OXZmca2tVA4DpewGpY/qFkW/gq9HdDrHLu7g0k90QnunDcFW4emb7NB60sGJQ0bw==} + engines: {node: '>=18'} + + '@polkadot/wasm-bridge@7.5.4': + resolution: {integrity: sha512-6xaJVvoZbnbgpQYXNw9OHVNWjXmtcoPcWh7hlwx3NpfiLkkjljj99YS+XGZQlq7ks2fVCg7FbfknkNb8PldDaA==} + engines: {node: '>=18'} + peerDependencies: + '@polkadot/util': '*' + '@polkadot/x-randomvalues': '*' + + '@polkadot/wasm-crypto-asmjs@7.5.4': + resolution: {integrity: sha512-ZYwxQHAJ8pPt6kYk9XFmyuFuSS+yirJLonvP+DYbxOrARRUHfN4nzp4zcZNXUuaFhpbDobDSFn6gYzye6BUotA==} + engines: {node: '>=18'} + peerDependencies: + '@polkadot/util': '*' + + '@polkadot/wasm-crypto-init@7.5.4': + resolution: {integrity: sha512-U6s4Eo2rHs2n1iR01vTz/sOQ7eOnRPjaCsGWhPV+ZC/20hkVzwPAhiizu/IqMEol4tO2yiSheD4D6bn0KxUJhg==} + engines: {node: '>=18'} + peerDependencies: + '@polkadot/util': '*' + '@polkadot/x-randomvalues': '*' + + '@polkadot/wasm-crypto-wasm@7.5.4': + resolution: {integrity: sha512-PsHgLsVTu43eprwSvUGnxybtOEuHPES6AbApcs7y5ZbM2PiDMzYbAjNul098xJK/CPtrxZ0ePDFnaQBmIJyTFw==} + engines: {node: '>=18'} + peerDependencies: + '@polkadot/util': '*' + + '@polkadot/wasm-crypto@7.5.4': + resolution: {integrity: sha512-1seyClxa7Jd7kQjfnCzTTTfYhTa/KUTDUaD3DMHBk5Q4ZUN1D1unJgX+v1aUeXSPxmzocdZETPJJRZjhVOqg9g==} + engines: {node: '>=18'} + peerDependencies: + '@polkadot/util': '*' + '@polkadot/x-randomvalues': '*' + + '@polkadot/wasm-util@7.5.4': + resolution: {integrity: sha512-hqPpfhCpRAqCIn/CYbBluhh0TXmwkJnDRjxrU9Bnqtw9nMNa97D8JuOjdd2pi0rxm+eeLQ/f1rQMp71RMM9t4w==} + engines: {node: '>=18'} + peerDependencies: + '@polkadot/util': '*' + + '@polkadot/x-bigint@14.0.3': + resolution: {integrity: sha512-U0al6BKgldFrEbmSObRAlzv9VDs5SMa/rbvZKvvkVec0sWTzYPWQZU1ZC/biXLYdjdKML89BeuCKmXZtCcGhUQ==} + engines: {node: '>=18'} + + '@polkadot/x-fetch@14.0.3': + resolution: {integrity: sha512-695c5aPBPtYcnn2zM+u0mXgyNHINlO0qGlGcJq3/0t5NVRZv5KZhk7NNm6antOay9uUjGG40F/r+LPzDT3QamA==} + engines: {node: '>=18'} + + '@polkadot/x-global@14.0.3': + resolution: {integrity: sha512-MzMEynJ7HMTy/plLmdyP8rv14RS/6s29HZodUG9aCOscBnEiEDxVEax/ztRJqxhhQuHeYdx0LYDwVbdQDTkqNw==} + engines: {node: '>=18'} + + '@polkadot/x-randomvalues@14.0.3': + resolution: {integrity: sha512-qTPcrk0nIHL2tIu5e0cLj3puQvjCK7onehnqO2fvlmWeIlvDel66fwWs06Ipsib+CwLJdmE6WgNy+8Jv74r6YA==} + engines: {node: '>=18'} + peerDependencies: + '@polkadot/util': 14.0.3 + '@polkadot/wasm-util': '*' + + '@polkadot/x-textdecoder@14.0.3': + resolution: {integrity: sha512-4RJYDG00iUzQ7YAuS/yvkWRZlkjYU8PUNdJHRfqtJ+SjrSPB7LYYxFhLgw43TZUtHmIueNTsml2Ukv3xXTr2kA==} + engines: {node: '>=18'} + + '@polkadot/x-textencoder@14.0.3': + resolution: {integrity: sha512-9HH6o2L+r99wEfXhPb5g+Xwn7qouqD32PsMux7B0dFGR2KNqP4KwO19Hu+gdij6wsEhy7delhZwzHenrWwDfhQ==} + engines: {node: '>=18'} + + '@polkadot/x-ws@14.0.3': + resolution: {integrity: sha512-tOPdkMye3iuXnuFtdNg5+iSu7Cz9LRL8z5psMuZpUpThMYChGsS2pDFtNvXOKU8ohhO+frY9VdJ9VBg1WL9Iug==} + engines: {node: '>=18'} + '@rollup/rollup-android-arm-eabi@4.61.1': resolution: {integrity: sha512-JnBB8MdXj45cajvTuO5FmPlvFVJRQgvrz1uSEl3NwqFnReAPGwb8EanbGi4z2nRaqLzjJSv5/JmycoTKlRZxHA==} cpu: [arm] @@ -1923,6 +2106,9 @@ packages: '@scure/bip39@1.6.0': resolution: {integrity: sha512-+lF0BbLiJNwVlev4eKelw1WWLaiKXw7sSl8T6FvBlWkdX+94aGJ4o8XjUdlyhTCjd8c+B3KT3JfS8P0bLRNU6A==} + '@scure/sr25519@0.2.0': + resolution: {integrity: sha512-uUuLP7Z126XdSizKtrCGqYyR3b3hYtJ6Fg/XFUXmc2//k2aXHDLqZwFeXxL97gg4XydPROPVnuaHGF2+xriSKg==} + '@scure/sr25519@1.0.0': resolution: {integrity: sha512-b+uhK5akMINXZP95F3gJGcb5CMKYxf+q55fwMl0GoBwZDbWolmGNi1FrBSwuaZX5AhqS2byHiAueZgtDNpot2A==} engines: {node: '>= 20.19.0'} @@ -1938,6 +2124,27 @@ packages: resolution: {integrity: sha512-tlqY9xq5ukxTUZBmoOp+m61cqwQD5pHJtFY3Mn8CA8ps6yghLH/Hw8UPdqg4OLmFW3IFlcXnQNmo/dh8HzXYIQ==} engines: {node: '>=18'} + '@substrate/connect-extension-protocol@2.2.2': + resolution: {integrity: sha512-t66jwrXA0s5Goq82ZtjagLNd7DPGCNjHeehRlE/gcJmJ+G56C0W+2plqOMRicJ8XGR1/YFnUSEqUFiSNbjGrAA==} + + '@substrate/connect-known-chains@1.10.3': + resolution: {integrity: sha512-OJEZO1Pagtb6bNE3wCikc2wrmvEU5x7GxFFLqqbz1AJYYxSlrPCGu4N2og5YTExo4IcloNMQYFRkBGue0BKZ4w==} + + '@substrate/connect@0.8.11': + resolution: {integrity: sha512-ofLs1PAO9AtDdPbdyTYj217Pe+lBfTLltdHDs3ds8no0BseoLeAGxpz1mHfi7zB4IxI3YyAiLjH6U8cw4pj4Nw==} + deprecated: versions below 1.x are no longer maintained + + '@substrate/light-client-extension-helpers@1.0.0': + resolution: {integrity: sha512-TdKlni1mBBZptOaeVrKnusMg/UBpWUORNDv5fdCaJklP4RJiFOzBCrzC+CyVI5kQzsXBisZ+2pXm+rIjS38kHg==} + peerDependencies: + smoldot: 2.x + + '@substrate/ss58-registry@1.51.0': + resolution: {integrity: sha512-TWDurLiPxndFgKjVavCniytBIw+t4ViOi7TYp9h/D0NMmkEc9klFTo+827eyEJ0lELpqO207Ey7uGxUa+BS1jQ==} + + '@types/bn.js@5.2.0': + resolution: {integrity: sha512-DLbJ1BPqxvQhIGbeu8VbUC1DiAiahHtAYvA0ZEAa4P31F7IaArc8z3C3BRQdWX4mtLQuABG4yzp76ZrS02Ui1Q==} + '@types/chai@5.2.3': resolution: {integrity: sha512-Mw558oeA9fFbv65/y4mHtXDs9bPnFMZAL/jxdPFUpOHHIXX91mcgEHbS5Lahr+pwZFR8A7GQleRWeI6cGFC2UA==} @@ -2058,6 +2265,9 @@ packages: resolution: {integrity: sha512-pbnl5XzGBdrFU/wT4jqmJVPn2B6UHPBOhzMQkY/SPUPB6QtUXtmBHBIwCbXJol93mOpGMnQyP/+BB19q04xj7g==} engines: {node: '>=4'} + bn.js@5.2.5: + resolution: {integrity: sha512-Vq886eXykuP5E6HcKSSStP3bJgrE6In5WKxVUvJ8XGpWWYs2xZHWqUwzCtGgEtBcxyd57KBFDPFoUfNzdaHCNg==} + braces@3.0.3: resolution: {integrity: sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==} engines: {node: '>=8'} @@ -2135,6 +2345,10 @@ packages: csstype@3.2.3: resolution: {integrity: sha512-z1HGKcYy2xA8AGQfwrn0PAy+PB7X/GSj3UVJW9qKyn43xWa+gl5nXmU4qqLMRzWVLFC8KusUX8T/0kCiOYpAIQ==} + data-uri-to-buffer@4.0.1: + resolution: {integrity: sha512-0R9ikRb668HB7QDxT1vkpuUBtqc53YyAwMwGeUFKRojY/NWKvdZ+9UYtRfGmhqNbRkTSVpMbmyhXipFFv2cb/A==} + engines: {node: '>= 12'} + debug@4.4.3: resolution: {integrity: sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==} engines: {node: '>=6.0'} @@ -2234,6 +2448,10 @@ packages: picomatch: optional: true + fetch-blob@3.2.0: + resolution: {integrity: sha512-7yAQpD2UMJzLi1Dqv7qFYnPbaPx7ZfFK6PiIxQ4PfkGPyNyl2Ugx+a/umUonmKqjhM4DnfbMvdX6otXq83soQQ==} + engines: {node: ^12.20 || >= 14.13} + figures@6.1.0: resolution: {integrity: sha512-d+l3qxjSesT4V7v2fh+QnmFnUWv9lSpjarhShNTgBOfA0ttejbQUAlHLitbjkoRiDulW0OPoQPYIGhIC8ohejg==} engines: {node: '>=18'} @@ -2249,6 +2467,10 @@ packages: fix-dts-default-cjs-exports@1.0.1: resolution: {integrity: sha512-pVIECanWFC61Hzl2+oOCtoJ3F17kglZC/6N94eRWycFgBH35hHx0Li604ZIzhseh97mf2p0cv7vVrOZGoqhlEg==} + formdata-polyfill@4.0.10: + resolution: {integrity: sha512-buewHzMvYL29jdeQTVILecSaZKnt/RJWjoZCF5OW60Z67/GmSLBkOFM7qh1PI3zFNtJbaZL5eQu1vLfazOwj4g==} + engines: {node: '>=12.20.0'} + fs-extra@7.0.1: resolution: {integrity: sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw==} engines: {node: '>=6 <7 || >=8'} @@ -2397,6 +2619,9 @@ packages: resolution: {integrity: sha512-qQKT4zQxXl8lLwBtHMWwaTcGfFOZviOJet3Oy/xmGk2gZH677CJM9EvtfdSkgWcATZhj/55JZ0rmy3myCT5lsA==} hasBin: true + json-stringify-safe@5.0.1: + resolution: {integrity: sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA==} + jsonfile@4.0.0: resolution: {integrity: sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==} @@ -2454,6 +2679,10 @@ packages: mlly@1.8.2: resolution: {integrity: sha512-d+ObxMQFmbt10sretNDytwt85VrbkhhUA/JBGm1MPaWJ65Cl4wOgLaB1NYvJSZ0Ef03MMEU/0xpPMXUIQ29UfA==} + mock-socket@9.3.1: + resolution: {integrity: sha512-qxBgB7Qa2sEQgHFjj0dSigq7fX4k6Saisd5Nelwp2q8mlbAFh5dHV9JTTlF8viYJLSSWgMCZFUom8PJcMNBoJw==} + engines: {node: '>= 8'} + mri@1.2.0: resolution: {integrity: sha512-tzzskb3bG8LvYGFF/mDTpq3jpI6Q9wc3LEmBaghu+DdCssd1FakN7Bc0hVNmEyGq1bq3RgfkCb3cmQLpNPOroA==} engines: {node: '>=4'} @@ -2467,6 +2696,10 @@ packages: mz@2.7.0: resolution: {integrity: sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q==} + nanoevents@10.0.0: + resolution: {integrity: sha512-PmIJ3BNxOzgVgnS1r/Pvyj6eZx/xUV2JCPogh0brD6smDIwjRlr1KBl9yoRX323PlfaNrBDDnfCgC9SL00OjSg==} + engines: {node: ^22.0.0 || ^24.0.0 || >=26.0.0} + nanoevents@9.1.0: resolution: {integrity: sha512-Jd0fILWG44a9luj8v5kED4WI+zfkkgwKyRQKItTtlPfEsh7Lznfi1kr8/iZ+XAIss4Qq5GqRB0qtWbaz9ceO/A==} engines: {node: ^18.0.0 || >=20.0.0} @@ -2486,10 +2719,28 @@ packages: engines: {node: ^18 || >=20} hasBin: true + nanoid@6.0.0: + resolution: {integrity: sha512-mkUH+rPkwU2qPadJ0oJZOjeZ5Mxn8Q1UhevwkTRWNuUZzyia3h4rhzK39hxaHTk0o2OxB8W2SQ6A8k23ZDi1pQ==} + engines: {node: ^22 || ^24 || >=26} + hasBin: true + neverthrow@8.2.0: resolution: {integrity: sha512-kOCT/1MCPAxY5iUV3wytNFUMUolzuwd/VF/1KCx7kf6CutrOsTie+84zTGTpgQycjvfLdBBdvBvFLqFD2c0wkQ==} engines: {node: '>=18'} + nock@13.5.6: + resolution: {integrity: sha512-o2zOYiCpzRqSzPj0Zt/dQ/DqZeYoaQ7TUonc/xUPjCGl9WeHpNbxgVvOquXYAaJzI0M9BXV3HTzG0p8IUAbBTQ==} + engines: {node: '>= 10.13'} + + node-domexception@1.0.0: + resolution: {integrity: sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ==} + engines: {node: '>=10.5.0'} + deprecated: Use your platform's native DOMException instead + + node-fetch@3.3.2: + resolution: {integrity: sha512-dRB78srN/l6gqWulah9SrxeYnxeddIG30+GOqK/9OlLVyLg3HPnr6SqOWTWOXKRwC2eGYCkZ59NNuSgvSrpgOA==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + normalize-package-data@6.0.2: resolution: {integrity: sha512-V6gygoYb/5EmNI+MEGrWkC+e6+Rr7mTmfHrxDbLzxQogBkgzo76rkok0Am6thgSF7Mv2nLOajAJj5vDJZEFn7g==} engines: {node: ^16.14.0 || >=18.0.0} @@ -2652,6 +2903,10 @@ packages: resolution: {integrity: sha512-gjVS5hOP+M3wMm5nmNOucbIrqudzs9v/57bWRHQWLYklXqoXKrVfYW2W9+glfGsqtPgpiz5WwyEEB+ksXIx3gQ==} engines: {node: '>=18'} + propagate@2.0.1: + resolution: {integrity: sha512-vGrhOavPSTz4QVNuBNdcNXePNdNMaO1xj9yBeH1ScQPjk/rhg9sSlCXPhMkFuaNNW/syTvYqsnbIJxMBfRbbag==} + engines: {node: '>= 8'} + protons-runtime@6.0.1: resolution: {integrity: sha512-ONL+jDj143WA1m+WKLuuqBIaDKxm32dx6HfJdyujrRcni/6KkhXzVnyg22nH/Wwqmbwnd1BKUVkD1hMEWZFeww==} @@ -2772,6 +3027,9 @@ packages: resolution: {integrity: sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==} engines: {node: '>=8'} + smoldot@2.0.26: + resolution: {integrity: sha512-F+qYmH4z2s2FK+CxGj8moYcd1ekSIKH8ywkdqlOz88Dat35iB1DIYL11aILN46YSGMzQW/lbJNS307zBSDN5Ig==} + smoldot@3.2.0: resolution: {integrity: sha512-FO332bGlKO1UE0Io0B30omzaHSLjmlN61h6F4MtbwZMdy4XPetphmwVhzv4VUXN7l7prIvRTGrgeqKepL8kNuw==} @@ -3106,6 +3364,10 @@ packages: jsdom: optional: true + web-streams-polyfill@3.3.3: + resolution: {integrity: sha512-d2JWLCivmZYTSIoge9MsgFCZrt571BikcWGYkjC1khllbTeDlGqZ2D8vD8E/lJa8WGWbb7Plm8/XJYV7IJHZZw==} + engines: {node: '>= 8'} + which-module@2.0.1: resolution: {integrity: sha512-iBdZ57RDvnOR9AGBhML2vFZf7h8vmBjhoaZqODJBFWHVtKkDmKuHai3cx5PgVMrX5YDNp27AofYbAwctSS+vhQ==} @@ -3671,6 +3933,23 @@ snapshots: '@nodelib/fs.scandir': 2.1.5 fastq: 1.20.1 + '@novasamatech/host-api-wrapper@0.9.2(@polkadot/api@16.5.6)(@polkadot/util@14.0.3)(esbuild@0.28.1)(rxjs@7.8.2)': + dependencies: + '@novasamatech/host-api': 0.9.2 + '@polkadot-api/json-rpc-provider-proxy': 0.4.0 + '@polkadot-api/substrate-bindings': 0.20.3 + '@polkadot/extension-inject': 0.63.1(@polkadot/api@16.5.6)(@polkadot/util@14.0.3) + neverthrow: 8.2.0 + polkadot-api: 2.1.6(esbuild@0.28.1)(rxjs@7.8.2) + transitivePeerDependencies: + - '@polkadot/api' + - '@polkadot/util' + - bufferutil + - esbuild + - rxjs + - supports-color + - utf-8-validate + '@novasamatech/host-api@0.8.9': dependencies: '@novasamatech/scale': 0.8.9 @@ -3679,6 +3958,14 @@ snapshots: neverthrow: 8.2.0 scale-ts: 1.6.1 + '@novasamatech/host-api@0.9.2': + dependencies: + '@novasamatech/scale': 0.9.2 + nanoevents: 10.0.0 + nanoid: 6.0.0 + neverthrow: 8.2.0 + scale-ts: 1.6.1 + '@novasamatech/host-papp@0.8.9(esbuild@0.28.1)': dependencies: '@noble/ciphers': 2.2.0 @@ -3707,6 +3994,11 @@ snapshots: '@polkadot-api/utils': 0.4.0 scale-ts: 1.6.1 + '@novasamatech/scale@0.9.2': + dependencies: + '@polkadot-api/utils': 0.4.0 + scale-ts: 1.6.1 + '@novasamatech/sdk-statement@0.6.0(esbuild@0.28.1)(rxjs@7.8.2)': dependencies: '@polkadot-api/substrate-bindings': 0.20.1 @@ -3823,6 +4115,9 @@ snapshots: '@polkadot-api/substrate-bindings': 0.20.3 '@polkadot-api/utils': 0.4.0 + '@polkadot-api/json-rpc-provider-proxy@0.1.0': + optional: true + '@polkadot-api/json-rpc-provider-proxy@0.4.0': {} '@polkadot-api/json-rpc-provider@0.2.0': {} @@ -3844,6 +4139,12 @@ snapshots: '@polkadot-api/substrate-bindings': 0.20.3 '@polkadot-api/utils': 0.4.0 + '@polkadot-api/metadata-builders@0.3.2': + dependencies: + '@polkadot-api/substrate-bindings': 0.6.0 + '@polkadot-api/utils': 0.1.0 + optional: true + '@polkadot-api/metadata-compatibility@0.6.3': dependencies: '@polkadot-api/metadata-builders': 0.14.3 @@ -3857,6 +4158,15 @@ snapshots: '@polkadot-api/utils': 0.4.0 rxjs: 7.8.2 + '@polkadot-api/observable-client@0.3.2(@polkadot-api/substrate-client@0.1.4)(rxjs@7.8.2)': + dependencies: + '@polkadot-api/metadata-builders': 0.3.2 + '@polkadot-api/substrate-bindings': 0.6.0 + '@polkadot-api/substrate-client': 0.1.4 + '@polkadot-api/utils': 0.1.0 + rxjs: 7.8.2 + optional: true + '@polkadot-api/pjs-signer@0.7.3': dependencies: '@polkadot-api/metadata-builders': 0.14.3 @@ -3915,12 +4225,29 @@ snapshots: '@scure/base': 2.2.0 scale-ts: 1.6.1 + '@polkadot-api/substrate-bindings@0.6.0': + dependencies: + '@noble/hashes': 1.8.0 + '@polkadot-api/utils': 0.1.0 + '@scure/base': 1.2.6 + scale-ts: 1.6.1 + optional: true + + '@polkadot-api/substrate-client@0.1.4': + dependencies: + '@polkadot-api/json-rpc-provider': 0.2.0 + '@polkadot-api/utils': 0.1.0 + optional: true + '@polkadot-api/substrate-client@0.7.0': dependencies: '@polkadot-api/json-rpc-provider': 0.2.0 '@polkadot-api/raw-client': 0.3.0 '@polkadot-api/utils': 0.4.0 + '@polkadot-api/utils@0.1.0': + optional: true + '@polkadot-api/utils@0.4.0': {} '@polkadot-api/wasm-executor@0.2.3': {} @@ -3963,6 +4290,298 @@ snapshots: '@polkadot-labs/schnorrkel-wasm@0.0.9': {} + '@polkadot/api-augment@16.5.6': + dependencies: + '@polkadot/api-base': 16.5.6 + '@polkadot/rpc-augment': 16.5.6 + '@polkadot/types': 16.5.6 + '@polkadot/types-augment': 16.5.6 + '@polkadot/types-codec': 16.5.6 + '@polkadot/util': 14.0.3 + tslib: 2.8.1 + transitivePeerDependencies: + - bufferutil + - supports-color + - utf-8-validate + + '@polkadot/api-base@16.5.6': + dependencies: + '@polkadot/rpc-core': 16.5.6 + '@polkadot/types': 16.5.6 + '@polkadot/util': 14.0.3 + rxjs: 7.8.2 + tslib: 2.8.1 + transitivePeerDependencies: + - bufferutil + - supports-color + - utf-8-validate + + '@polkadot/api-derive@16.5.6': + dependencies: + '@polkadot/api': 16.5.6 + '@polkadot/api-augment': 16.5.6 + '@polkadot/api-base': 16.5.6 + '@polkadot/rpc-core': 16.5.6 + '@polkadot/types': 16.5.6 + '@polkadot/types-codec': 16.5.6 + '@polkadot/util': 14.0.3 + '@polkadot/util-crypto': 14.0.3(@polkadot/util@14.0.3) + rxjs: 7.8.2 + tslib: 2.8.1 + transitivePeerDependencies: + - bufferutil + - supports-color + - utf-8-validate + + '@polkadot/api@16.5.6': + dependencies: + '@polkadot/api-augment': 16.5.6 + '@polkadot/api-base': 16.5.6 + '@polkadot/api-derive': 16.5.6 + '@polkadot/keyring': 14.0.3(@polkadot/util-crypto@14.0.3(@polkadot/util@14.0.3))(@polkadot/util@14.0.3) + '@polkadot/rpc-augment': 16.5.6 + '@polkadot/rpc-core': 16.5.6 + '@polkadot/rpc-provider': 16.5.6 + '@polkadot/types': 16.5.6 + '@polkadot/types-augment': 16.5.6 + '@polkadot/types-codec': 16.5.6 + '@polkadot/types-create': 16.5.6 + '@polkadot/types-known': 16.5.6 + '@polkadot/util': 14.0.3 + '@polkadot/util-crypto': 14.0.3(@polkadot/util@14.0.3) + eventemitter3: 5.0.1 + rxjs: 7.8.2 + tslib: 2.8.1 + transitivePeerDependencies: + - bufferutil + - supports-color + - utf-8-validate + + '@polkadot/extension-inject@0.63.1(@polkadot/api@16.5.6)(@polkadot/util@14.0.3)': + dependencies: + '@polkadot/api': 16.5.6 + '@polkadot/rpc-provider': 16.5.6 + '@polkadot/types': 16.5.6 + '@polkadot/util': 14.0.3 + '@polkadot/util-crypto': 14.0.3(@polkadot/util@14.0.3) + '@polkadot/x-global': 14.0.3 + tslib: 2.8.1 + transitivePeerDependencies: + - bufferutil + - supports-color + - utf-8-validate + + '@polkadot/keyring@14.0.3(@polkadot/util-crypto@14.0.3(@polkadot/util@14.0.3))(@polkadot/util@14.0.3)': + dependencies: + '@polkadot/util': 14.0.3 + '@polkadot/util-crypto': 14.0.3(@polkadot/util@14.0.3) + tslib: 2.8.1 + + '@polkadot/networks@14.0.3': + dependencies: + '@polkadot/util': 14.0.3 + '@substrate/ss58-registry': 1.51.0 + tslib: 2.8.1 + + '@polkadot/rpc-augment@16.5.6': + dependencies: + '@polkadot/rpc-core': 16.5.6 + '@polkadot/types': 16.5.6 + '@polkadot/types-codec': 16.5.6 + '@polkadot/util': 14.0.3 + tslib: 2.8.1 + transitivePeerDependencies: + - bufferutil + - supports-color + - utf-8-validate + + '@polkadot/rpc-core@16.5.6': + dependencies: + '@polkadot/rpc-augment': 16.5.6 + '@polkadot/rpc-provider': 16.5.6 + '@polkadot/types': 16.5.6 + '@polkadot/util': 14.0.3 + rxjs: 7.8.2 + tslib: 2.8.1 + transitivePeerDependencies: + - bufferutil + - supports-color + - utf-8-validate + + '@polkadot/rpc-provider@16.5.6': + dependencies: + '@polkadot/keyring': 14.0.3(@polkadot/util-crypto@14.0.3(@polkadot/util@14.0.3))(@polkadot/util@14.0.3) + '@polkadot/types': 16.5.6 + '@polkadot/types-support': 16.5.6 + '@polkadot/util': 14.0.3 + '@polkadot/util-crypto': 14.0.3(@polkadot/util@14.0.3) + '@polkadot/x-fetch': 14.0.3 + '@polkadot/x-global': 14.0.3 + '@polkadot/x-ws': 14.0.3 + eventemitter3: 5.0.1 + mock-socket: 9.3.1 + nock: 13.5.6 + tslib: 2.8.1 + optionalDependencies: + '@substrate/connect': 0.8.11 + transitivePeerDependencies: + - bufferutil + - supports-color + - utf-8-validate + + '@polkadot/types-augment@16.5.6': + dependencies: + '@polkadot/types': 16.5.6 + '@polkadot/types-codec': 16.5.6 + '@polkadot/util': 14.0.3 + tslib: 2.8.1 + + '@polkadot/types-codec@16.5.6': + dependencies: + '@polkadot/util': 14.0.3 + '@polkadot/x-bigint': 14.0.3 + tslib: 2.8.1 + + '@polkadot/types-create@16.5.6': + dependencies: + '@polkadot/types-codec': 16.5.6 + '@polkadot/util': 14.0.3 + tslib: 2.8.1 + + '@polkadot/types-known@16.5.6': + dependencies: + '@polkadot/networks': 14.0.3 + '@polkadot/types': 16.5.6 + '@polkadot/types-codec': 16.5.6 + '@polkadot/types-create': 16.5.6 + '@polkadot/util': 14.0.3 + tslib: 2.8.1 + + '@polkadot/types-support@16.5.6': + dependencies: + '@polkadot/util': 14.0.3 + tslib: 2.8.1 + + '@polkadot/types@16.5.6': + dependencies: + '@polkadot/keyring': 14.0.3(@polkadot/util-crypto@14.0.3(@polkadot/util@14.0.3))(@polkadot/util@14.0.3) + '@polkadot/types-augment': 16.5.6 + '@polkadot/types-codec': 16.5.6 + '@polkadot/types-create': 16.5.6 + '@polkadot/util': 14.0.3 + '@polkadot/util-crypto': 14.0.3(@polkadot/util@14.0.3) + rxjs: 7.8.2 + tslib: 2.8.1 + + '@polkadot/util-crypto@14.0.3(@polkadot/util@14.0.3)': + dependencies: + '@noble/curves': 1.9.7 + '@noble/hashes': 1.8.0 + '@polkadot/networks': 14.0.3 + '@polkadot/util': 14.0.3 + '@polkadot/wasm-crypto': 7.5.4(@polkadot/util@14.0.3)(@polkadot/x-randomvalues@14.0.3(@polkadot/util@14.0.3)(@polkadot/wasm-util@7.5.4(@polkadot/util@14.0.3))) + '@polkadot/wasm-util': 7.5.4(@polkadot/util@14.0.3) + '@polkadot/x-bigint': 14.0.3 + '@polkadot/x-randomvalues': 14.0.3(@polkadot/util@14.0.3)(@polkadot/wasm-util@7.5.4(@polkadot/util@14.0.3)) + '@scure/base': 1.2.6 + '@scure/sr25519': 0.2.0 + tslib: 2.8.1 + + '@polkadot/util@14.0.3': + dependencies: + '@polkadot/x-bigint': 14.0.3 + '@polkadot/x-global': 14.0.3 + '@polkadot/x-textdecoder': 14.0.3 + '@polkadot/x-textencoder': 14.0.3 + '@types/bn.js': 5.2.0 + bn.js: 5.2.5 + tslib: 2.8.1 + + '@polkadot/wasm-bridge@7.5.4(@polkadot/util@14.0.3)(@polkadot/x-randomvalues@14.0.3(@polkadot/util@14.0.3)(@polkadot/wasm-util@7.5.4(@polkadot/util@14.0.3)))': + dependencies: + '@polkadot/util': 14.0.3 + '@polkadot/wasm-util': 7.5.4(@polkadot/util@14.0.3) + '@polkadot/x-randomvalues': 14.0.3(@polkadot/util@14.0.3)(@polkadot/wasm-util@7.5.4(@polkadot/util@14.0.3)) + tslib: 2.8.1 + + '@polkadot/wasm-crypto-asmjs@7.5.4(@polkadot/util@14.0.3)': + dependencies: + '@polkadot/util': 14.0.3 + tslib: 2.8.1 + + '@polkadot/wasm-crypto-init@7.5.4(@polkadot/util@14.0.3)(@polkadot/x-randomvalues@14.0.3(@polkadot/util@14.0.3)(@polkadot/wasm-util@7.5.4(@polkadot/util@14.0.3)))': + dependencies: + '@polkadot/util': 14.0.3 + '@polkadot/wasm-bridge': 7.5.4(@polkadot/util@14.0.3)(@polkadot/x-randomvalues@14.0.3(@polkadot/util@14.0.3)(@polkadot/wasm-util@7.5.4(@polkadot/util@14.0.3))) + '@polkadot/wasm-crypto-asmjs': 7.5.4(@polkadot/util@14.0.3) + '@polkadot/wasm-crypto-wasm': 7.5.4(@polkadot/util@14.0.3) + '@polkadot/wasm-util': 7.5.4(@polkadot/util@14.0.3) + '@polkadot/x-randomvalues': 14.0.3(@polkadot/util@14.0.3)(@polkadot/wasm-util@7.5.4(@polkadot/util@14.0.3)) + tslib: 2.8.1 + + '@polkadot/wasm-crypto-wasm@7.5.4(@polkadot/util@14.0.3)': + dependencies: + '@polkadot/util': 14.0.3 + '@polkadot/wasm-util': 7.5.4(@polkadot/util@14.0.3) + tslib: 2.8.1 + + '@polkadot/wasm-crypto@7.5.4(@polkadot/util@14.0.3)(@polkadot/x-randomvalues@14.0.3(@polkadot/util@14.0.3)(@polkadot/wasm-util@7.5.4(@polkadot/util@14.0.3)))': + dependencies: + '@polkadot/util': 14.0.3 + '@polkadot/wasm-bridge': 7.5.4(@polkadot/util@14.0.3)(@polkadot/x-randomvalues@14.0.3(@polkadot/util@14.0.3)(@polkadot/wasm-util@7.5.4(@polkadot/util@14.0.3))) + '@polkadot/wasm-crypto-asmjs': 7.5.4(@polkadot/util@14.0.3) + '@polkadot/wasm-crypto-init': 7.5.4(@polkadot/util@14.0.3)(@polkadot/x-randomvalues@14.0.3(@polkadot/util@14.0.3)(@polkadot/wasm-util@7.5.4(@polkadot/util@14.0.3))) + '@polkadot/wasm-crypto-wasm': 7.5.4(@polkadot/util@14.0.3) + '@polkadot/wasm-util': 7.5.4(@polkadot/util@14.0.3) + '@polkadot/x-randomvalues': 14.0.3(@polkadot/util@14.0.3)(@polkadot/wasm-util@7.5.4(@polkadot/util@14.0.3)) + tslib: 2.8.1 + + '@polkadot/wasm-util@7.5.4(@polkadot/util@14.0.3)': + dependencies: + '@polkadot/util': 14.0.3 + tslib: 2.8.1 + + '@polkadot/x-bigint@14.0.3': + dependencies: + '@polkadot/x-global': 14.0.3 + tslib: 2.8.1 + + '@polkadot/x-fetch@14.0.3': + dependencies: + '@polkadot/x-global': 14.0.3 + node-fetch: 3.3.2 + tslib: 2.8.1 + + '@polkadot/x-global@14.0.3': + dependencies: + tslib: 2.8.1 + + '@polkadot/x-randomvalues@14.0.3(@polkadot/util@14.0.3)(@polkadot/wasm-util@7.5.4(@polkadot/util@14.0.3))': + dependencies: + '@polkadot/util': 14.0.3 + '@polkadot/wasm-util': 7.5.4(@polkadot/util@14.0.3) + '@polkadot/x-global': 14.0.3 + tslib: 2.8.1 + + '@polkadot/x-textdecoder@14.0.3': + dependencies: + '@polkadot/x-global': 14.0.3 + tslib: 2.8.1 + + '@polkadot/x-textencoder@14.0.3': + dependencies: + '@polkadot/x-global': 14.0.3 + tslib: 2.8.1 + + '@polkadot/x-ws@14.0.3': + dependencies: + '@polkadot/x-global': 14.0.3 + tslib: 2.8.1 + ws: 8.21.0 + transitivePeerDependencies: + - bufferutil + - utf-8-validate + '@rollup/rollup-android-arm-eabi@4.61.1': optional: true @@ -4060,6 +4679,11 @@ snapshots: '@noble/hashes': 1.8.0 '@scure/base': 1.2.6 + '@scure/sr25519@0.2.0': + dependencies: + '@noble/curves': 1.9.7 + '@noble/hashes': 1.8.0 + '@scure/sr25519@1.0.0': dependencies: '@noble/curves': 2.0.1 @@ -4074,6 +4698,41 @@ snapshots: '@sindresorhus/merge-streams@4.0.0': {} + '@substrate/connect-extension-protocol@2.2.2': + optional: true + + '@substrate/connect-known-chains@1.10.3': + optional: true + + '@substrate/connect@0.8.11': + dependencies: + '@substrate/connect-extension-protocol': 2.2.2 + '@substrate/connect-known-chains': 1.10.3 + '@substrate/light-client-extension-helpers': 1.0.0(smoldot@2.0.26) + smoldot: 2.0.26 + transitivePeerDependencies: + - bufferutil + - utf-8-validate + optional: true + + '@substrate/light-client-extension-helpers@1.0.0(smoldot@2.0.26)': + dependencies: + '@polkadot-api/json-rpc-provider': 0.2.0 + '@polkadot-api/json-rpc-provider-proxy': 0.1.0 + '@polkadot-api/observable-client': 0.3.2(@polkadot-api/substrate-client@0.1.4)(rxjs@7.8.2) + '@polkadot-api/substrate-client': 0.1.4 + '@substrate/connect-extension-protocol': 2.2.2 + '@substrate/connect-known-chains': 1.10.3 + rxjs: 7.8.2 + smoldot: 2.0.26 + optional: true + + '@substrate/ss58-registry@1.51.0': {} + + '@types/bn.js@5.2.0': + dependencies: + '@types/node': 22.19.17 + '@types/chai@5.2.3': dependencies: '@types/deep-eql': 4.0.2 @@ -4196,6 +4855,8 @@ snapshots: dependencies: is-windows: 1.0.2 + bn.js@5.2.5: {} + braces@3.0.3: dependencies: fill-range: 7.1.1 @@ -4261,6 +4922,8 @@ snapshots: csstype@3.2.3: {} + data-uri-to-buffer@4.0.1: {} + debug@4.4.3: dependencies: ms: 2.1.3 @@ -4420,6 +5083,11 @@ snapshots: optionalDependencies: picomatch: 4.0.4 + fetch-blob@3.2.0: + dependencies: + node-domexception: 1.0.0 + web-streams-polyfill: 3.3.3 + figures@6.1.0: dependencies: is-unicode-supported: 2.1.0 @@ -4439,6 +5107,10 @@ snapshots: mlly: 1.8.2 rollup: 4.61.1 + formdata-polyfill@4.0.10: + dependencies: + fetch-blob: 3.2.0 + fs-extra@7.0.1: dependencies: graceful-fs: 4.2.11 @@ -4559,6 +5231,8 @@ snapshots: dependencies: argparse: 2.0.1 + json-stringify-safe@5.0.1: {} + jsonfile@4.0.0: optionalDependencies: graceful-fs: 4.2.11 @@ -4610,6 +5284,8 @@ snapshots: pkg-types: 1.3.1 ufo: 1.6.3 + mock-socket@9.3.1: {} + mri@1.2.0: {} ms@2.1.3: {} @@ -4622,6 +5298,8 @@ snapshots: object-assign: 4.1.1 thenify-all: 1.6.0 + nanoevents@10.0.0: {} + nanoevents@9.1.0: {} nanoid@3.3.12: {} @@ -4630,10 +5308,28 @@ snapshots: nanoid@5.1.9: {} + nanoid@6.0.0: {} + neverthrow@8.2.0: optionalDependencies: '@rollup/rollup-linux-x64-gnu': 4.60.3 + nock@13.5.6: + dependencies: + debug: 4.4.3 + json-stringify-safe: 5.0.1 + propagate: 2.0.1 + transitivePeerDependencies: + - supports-color + + node-domexception@1.0.0: {} + + node-fetch@3.3.2: + dependencies: + data-uri-to-buffer: 4.0.1 + fetch-blob: 3.2.0 + formdata-polyfill: 4.0.10 + normalize-package-data@6.0.2: dependencies: hosted-git-info: 7.0.2 @@ -4797,6 +5493,8 @@ snapshots: dependencies: parse-ms: 4.0.0 + propagate@2.0.1: {} + protons-runtime@6.0.1: dependencies: uint8-varint: 2.0.4 @@ -4936,6 +5634,14 @@ snapshots: slash@3.0.0: {} + smoldot@2.0.26: + dependencies: + ws: 8.21.0 + transitivePeerDependencies: + - bufferutil + - utf-8-validate + optional: true + smoldot@3.2.0: dependencies: ws: 8.21.0 @@ -5310,6 +6016,8 @@ snapshots: - tsx - yaml + web-streams-polyfill@3.3.3: {} + which-module@2.0.1: {} which@2.0.2: