diff --git a/README.md b/README.md index 2797dbd9..38b37013 100644 --- a/README.md +++ b/README.md @@ -150,6 +150,21 @@ traffic stays on the bounded PolkaVM runtime ABI 1. Guest Host requests use the Host-frame bytes use the canonical TrUAPI wire codec, currently version 3. Build guest clients against the SDK recorded in `vendor/truapi-host.lock.json`; runtime ABI 1 compatibility alone does not imply TrUAPI wire compatibility. +On this branch, `vendor/truapi-host.lock.json` pins the canonical SDK and Wasm to `feat/pvm-peer-transport`. JAM peer +transport is execution-local in the sandbox. Before dialing a network, it requests `JamPeers` permission through the +product's authenticated port to the shared page core. The host's Solid permission dialog shows the full genesis hash and +offers **Allow once**, **Always allow**, and **Deny**; dismissal saves no decision. Durable decisions are scoped to +product and genesis, while a one-time grant lasts only for that execution. This grants no account, signing, storage, or +arbitrary web access. + +The canonical session uses WebTransport to validators, with at most eight connections, sixteen streams per connection, +and 1 MiB messages. Received data remains unverified until the guest checks it. The runtime menu's **Network access** +section lists this execution's grants. Network updates continue while its display/audio menu is paused. Stop, +replacement, and runtime failure close the session and refuse outstanding permission requests; a replacement guest +cannot consume old replies. Ordinary host frames retain their 1 MiB bound and still use the shared page core; only peer +frames use the larger bound needed for message framing. The session's ten-second dial deadline includes the permission +prompt: a late decision does not resurrect an expired dial, though a retry can use the remembered decision. + App manifest v2 uses runtime ABI 1 with framebuffer, Tri2D, WebGPU Raster, and bounded capability negotiation; TrUAPI, MotionSample v1, text, IME, focus, and wheel input use the same pinned browser runtime as native Hosts. UI output v1 applies cursor and IME-agent state in the sandbox. Clipboard text and HTTP(S) navigation cross an origin-checked parent diff --git a/apps/sandbox/package.json b/apps/sandbox/package.json index 6be6c96e..5695e1c0 100644 --- a/apps/sandbox/package.json +++ b/apps/sandbox/package.json @@ -30,6 +30,7 @@ "@dotli/storage": "*", "@dotli/truapi-debug": "*", "@dotli/ui": "*", + "@parity/truapi": "file:../../vendor/truapi", "@sentry/browser": "^11.1.0", "@sentry/vite-plugin": "^5.4.0" } diff --git a/apps/sandbox/src/polkavm-menu.ts b/apps/sandbox/src/polkavm-menu.ts index 9e93f99d..6d3a5ec0 100644 --- a/apps/sandbox/src/polkavm-menu.ts +++ b/apps/sandbox/src/polkavm-menu.ts @@ -16,6 +16,8 @@ export function installPolkaVmMenu( options: { pause: (paused: boolean) => void; hasFileInput: boolean; + /** Lines describing network access the host granted this execution; read on every open. */ + grants: () => readonly string[]; retry: () => void; launcher: () => void; error?: string; @@ -59,6 +61,25 @@ export function installPolkaVmMenu( list.append(item); } help.append(summary, list); + const network = document.createElement('details'); + network.className = 'dotli-polkavm-network'; + const networkSummary = document.createElement('summary'); + networkSummary.textContent = 'Network access'; + const networkList = document.createElement('ul'); + network.append(networkSummary, networkList); + const renderGrants = (): void => { + const grants = options.grants(); + networkList.replaceChildren( + ...(grants.length === 0 ? ["This app has no network access beyond the host's own services."] : grants).map( + grant => { + const item = document.createElement('li'); + item.textContent = grant; + return item; + }, + ), + ); + }; + renderGrants(); const changeFile = options.hasFileInput ? button('Change Game / Choose file') : null; if (changeFile !== null) { changeFile.id = 'dotli-polkavm-file-open'; @@ -67,7 +88,7 @@ export function installPolkaVmMenu( retry.hidden = options.error === undefined; const launcher = button('Return to launcher'); launcher.hidden = !options.hasFileInput; - dialog.append(heading, message, resume, help); + dialog.append(heading, message, resume, help, network); if (changeFile !== null) { dialog.append(changeFile); } @@ -80,6 +101,7 @@ export function installPolkaVmMenu( return; } previousFocus = document.activeElement instanceof HTMLElement ? document.activeElement : null; + renderGrants(); options.pause(true); dialog.showModal(); toggle.setAttribute('aria-expanded', 'true'); diff --git a/apps/sandbox/src/polkavm-peer-permission.test.ts b/apps/sandbox/src/polkavm-peer-permission.test.ts new file mode 100644 index 00000000..0e5aa62b --- /dev/null +++ b/apps/sandbox/src/polkavm-peer-permission.test.ts @@ -0,0 +1,321 @@ +// @vitest-environment node +// Copyright 2026 Parity Technologies (UK) Ltd. +// SPDX-License-Identifier: AGPL-3.0-only + +import { describe, expect, it, vi } from 'vitest'; +import { + decodeWireMessage, + encodeWireMessage, + MESSAGE_TYPE_REQUEST, + MESSAGE_TYPE_RESPONSE, + TRUAPI_CODEC_VERSION, + VersionedHostHandshakeRequest, + VersionedHostJamPeerTransportDialError, + VersionedHostJamPeerTransportDialRequest, + VersionedHostJamPeerTransportDialResponse, + VersionedHostJamPeerTransportEventsRequest, + VersionedRemotePermissionError, + VersionedRemotePermissionRequest, + VersionedRemotePermissionResponse, +} from '@parity/truapi'; +import { + createJamPeerTransportSession, + type JamPeerTransportSession, + type WebTransportLike, +} from '@parity/truapi/jam-peer-transport'; +import * as S from '@parity/truapi/scale'; +import { + ACCOUNT_GET_ACCOUNT, + JAM_PEER_TRANSPORT_DIAL, + JAM_PEER_TRANSPORT_EVENTS, + PERMISSIONS_REQUEST_REMOTE_PERMISSION, + SYSTEM_HANDSHAKE, +} from '@parity/truapi/wire-table'; +import { JamPeersPermissionRequester } from './polkavm-peer-permission.js'; +import { dispatchHostFrame } from './polkavm-runtime.js'; + +const GENESIS = `0x3539${'35'.repeat(30)}` as const; +const OTHER_GENESIS = `0x${'ab'.repeat(32)}` as const; +/** A compressed P-256 point: the session derives WebTransport certificate hashes from it. */ +const P256 = '0x028874174c8f469438a1b1bab2fde75f9c4999461382ec6d47e9b3b4511294c607'; +const dialResult = S.Result( + VersionedHostJamPeerTransportDialResponse, + S.CallError(VersionedHostJamPeerTransportDialError), +); +const permissionResult = S.Result(VersionedRemotePermissionResponse, S.CallError(VersionedRemotePermissionError)); + +let requestCounter = 0; +function frame( + ids: { trait: number; method: number }, + value: Uint8Array, + messageType = MESSAGE_TYPE_REQUEST, + requestId = `guest-${String(requestCounter++)}`, +): Uint8Array { + const encoded = encodeWireMessage({ + requestId, + payload: { traitId: ids.trait, methodId: ids.method, messageType, value }, + }); + if (encoded.isErr()) { + throw encoded.error; + } + return new Uint8Array(encoded.value); +} + +const handshake = (): Uint8Array => + frame( + SYSTEM_HANDSHAKE, + VersionedHostHandshakeRequest.enc({ + tag: 'V1', + value: { codecVersion: TRUAPI_CODEC_VERSION }, + }), + ); + +const dial = (genesis: `0x${string}`): Uint8Array => + frame( + JAM_PEER_TRANSPORT_DIAL, + VersionedHostJamPeerTransportDialRequest.enc({ + tag: 'V1', + value: { + genesis, + ip: `0x${'00'.repeat(10)}ffff7f000001`, + port: 43000, + ed25519: `0x${'11'.repeat(32)}`, + p256: P256, + }, + }), + ); + +function fakeTransport(): WebTransportLike { + return { + ready: Promise.resolve(), + closed: new Promise(() => undefined), + incomingBidirectionalStreams: new ReadableStream(), + createBidirectionalStream: () => Promise.reject(new Error('unused')), + close: () => undefined, + }; +} + +/** + * One execution: the sandbox's requester and session on a fake authenticated + * host port. The fake host answers `permissions.request_remote_permission` + * like the core does after its prompt, and records what the guest sent. + */ +function execution(answer: (genesis: string) => boolean): { + send: (request: Uint8Array) => void; + responses: () => Promise; + prompts: string[]; + hostFrames: Uint8Array[]; + connects: string[]; + requester: JamPeersPermissionRequester; + session: JamPeerTransportSession; +} { + const prompts: string[] = []; + const hostFrames: Uint8Array[] = []; + const connects: string[] = []; + const guestResponses: Uint8Array[] = []; + const errors: Error[] = []; + let requester: JamPeersPermissionRequester | null = null; + const port = { + postMessage(message: unknown): void { + if (!(message instanceof Uint8Array)) { + throw new Error('Expected a binary host frame'); + } + const bytes = message; + const decoded = decodeWireMessage(bytes); + if (decoded.isErr()) { + throw decoded.error; + } + const { requestId, payload } = decoded.value; + if ( + payload.traitId !== PERMISSIONS_REQUEST_REMOTE_PERMISSION.trait || + payload.methodId !== PERMISSIONS_REQUEST_REMOTE_PERMISSION.method + ) { + hostFrames.push(bytes); + return; + } + const request = VersionedRemotePermissionRequest.dec(payload.value); + const { permission } = request.value; + if (permission.tag !== 'JamPeers') { + throw new Error(`unexpected permission ${permission.tag}`); + } + prompts.push(permission.value.genesis); + const reply = frame( + PERMISSIONS_REQUEST_REMOTE_PERMISSION, + permissionResult.enc({ + success: true, + value: { + tag: 'V1', + value: { granted: answer(permission.value.genesis) }, + }, + }), + MESSAGE_TYPE_RESPONSE, + requestId, + ); + queueMicrotask(() => { + // The sandbox consumes its own reply; the guest never sees it. + expect(requester?.claim(reply)).toBe(true); + }); + }, + }; + requester = new JamPeersPermissionRequester(port); + const session = createJamPeerTransportSession({ + authorize: requester.authorize, + connect: url => { + connects.push(url); + return fakeTransport(); + }, + now: () => 1_790_380_800, + }); + const pending: Promise[] = []; + return { + send: request => { + // Requests of the JamPeerTransport trait resolve on the session's reply; + // everything else is posted to the host synchronously. + const { promise, resolve } = Promise.withResolvers(); + pending.push(promise); + const routed = dispatchHostFrame( + request, + port, + session, + response => { + guestResponses.push(response); + resolve(undefined); + }, + error => { + errors.push(error); + resolve(undefined); + }, + ); + expect(routed).toBe(true); + if (wireTrait(request) !== JAM_PEER_TRANSPORT_DIAL.trait) { + resolve(undefined); + } + }, + responses: async () => { + await Promise.all(pending); + expect(errors).toEqual([]); + return guestResponses; + }, + prompts, + hostFrames, + connects, + requester, + session, + }; +} + +function wireTrait(bytes: Uint8Array): number | undefined { + const decoded = decodeWireMessage(bytes); + return decoded.isOk() ? decoded.value.payload.traitId : undefined; +} + +function dialOutcome(response: Uint8Array): string { + const decoded = decodeWireMessage(response); + if (decoded.isErr()) { + throw decoded.error; + } + const result = dialResult.dec(decoded.value.payload.value); + if (result.success) { + return `conn ${String(result.value.value.conn)}`; + } + return result.value.tag === 'Domain' ? result.value.value.value : result.value.tag; +} + +describe('PolkaVM JAM peer access as a runtime permission', () => { + it('answers a denied dial NotGranted without opening a WebTransport', async () => { + const app = execution(() => false); + app.send(handshake()); + app.send(dial(GENESIS)); + + const responses = await app.responses(); + expect(responses.map(dialOutcome)).toEqual(['NotGranted']); + expect(app.prompts).toEqual([GENESIS]); + expect(app.connects).toEqual([]); + expect(app.requester.granted()).toEqual([]); + app.requester.close(); + app.session.close(); + }); + + it('dials the peer once the host grants the network, and lists the grant', async () => { + const app = execution(() => true); + app.send(handshake()); + app.send(dial(GENESIS)); + + const responses = await app.responses(); + expect(responses.map(dialOutcome)).toEqual(['conn 1']); + expect(app.connects).toHaveLength(1); + expect(app.requester.granted()).toEqual([GENESIS]); + // Only the guest handshake reached the host as a guest frame. + expect(app.hostFrames.map(wireTrait)).toEqual([SYSTEM_HANDSHAKE.trait]); + app.session.close(); + }); + + it('prompts once for six dials of one network and separately for another', async () => { + const app = execution(genesis => genesis === GENESIS); + app.send(handshake()); + for (let index = 0; index < 6; index++) { + app.send(dial(GENESIS)); + } + app.send(dial(OTHER_GENESIS)); + + const outcomes = (await app.responses()).map(dialOutcome); + expect(outcomes.filter(outcome => outcome.startsWith('conn'))).toHaveLength(6); + expect(outcomes.filter(outcome => outcome === 'NotGranted')).toHaveLength(1); + expect(app.prompts).toEqual([GENESIS, OTHER_GENESIS]); + expect(app.connects).toHaveLength(6); + expect(app.requester.granted()).toEqual([GENESIS]); + app.session.close(); + }); + + it('never asks the host on behalf of an app that never dials', async () => { + const app = execution(() => true); + app.send(handshake()); + app.send(frame(ACCOUNT_GET_ACCOUNT, new Uint8Array())); + app.send(frame(JAM_PEER_TRANSPORT_EVENTS, VersionedHostJamPeerTransportEventsRequest.enc({ tag: 'V1' }))); + + await app.responses(); + expect(app.prompts).toEqual([]); + expect(app.hostFrames.map(wireTrait)).toEqual([SYSTEM_HANDSHAKE.trait, ACCOUNT_GET_ACCOUNT.trait]); + app.session.close(); + }); + + it('leaves guest replies to the guest and refuses outstanding requests on stop', async () => { + const port = { postMessage: vi.fn() }; + const requester = new JamPeersPermissionRequester(port); + const guestReply = frame( + PERMISSIONS_REQUEST_REMOTE_PERMISSION, + permissionResult.enc({ + success: true, + value: { tag: 'V1', value: { granted: true } }, + }), + MESSAGE_TYPE_RESPONSE, + ); + expect(requester.claim(guestReply)).toBe(false); + + const answer = requester.authorize(GENESIS); + expect(port.postMessage).toHaveBeenCalledTimes(1); + expect(requester.claim(guestReply)).toBe(false); + requester.close(); + await expect(answer).resolves.toBe(false); + await expect(requester.authorize(GENESIS)).resolves.toBe(false); + expect(port.postMessage).toHaveBeenCalledTimes(1); + }); + + it('keeps the 1 MiB host bound for non-peer frames', () => { + const port = { postMessage: vi.fn() }; + const session = createJamPeerTransportSession({ + authorize: () => Promise.resolve(true), + }); + expect( + dispatchHostFrame( + new Uint8Array(1024 * 1024 + 1), + port, + session, + () => undefined, + () => undefined, + ), + ).toBe(false); + expect(port.postMessage).not.toHaveBeenCalled(); + session.close(); + }); +}); diff --git a/apps/sandbox/src/polkavm-peer-permission.ts b/apps/sandbox/src/polkavm-peer-permission.ts new file mode 100644 index 00000000..5bd833b9 --- /dev/null +++ b/apps/sandbox/src/polkavm-peer-permission.ts @@ -0,0 +1,200 @@ +// Copyright 2026 Parity Technologies (UK) Ltd. +// SPDX-License-Identifier: AGPL-3.0-only + +// JAM peer access is a runtime permission, never a manifest capability. When +// the guest dials a JAM network, the sandbox asks the host over the same +// authenticated TrUAPI port the guest uses, with a request id of its own, and +// consumes the reply itself. The host core checks the product's stored +// decision, prompts when it is undetermined and persists the answer per +// product and genesis. + +import { + decodeWireMessage, + encodeWireMessage, + MESSAGE_TYPE_REQUEST, + MESSAGE_TYPE_RESPONSE, + VersionedRemotePermissionError, + VersionedRemotePermissionRequest, + VersionedRemotePermissionResponse, +} from '@parity/truapi'; +import * as S from '@parity/truapi/scale'; +import { PERMISSIONS_REQUEST_REMOTE_PERMISSION } from '@parity/truapi/wire-table'; + +const remotePermissionResult = S.Result(VersionedRemotePermissionResponse, S.CallError(VersionedRemotePermissionError)); +const REQUEST_ID_PREFIX = 'dotli-jam-peers:'; +/** Prefix plus 16 random bytes in hex: unguessable by the guest sharing the port. */ +const REQUEST_ID_BYTES = REQUEST_ID_PREFIX.length + 32; +const textDecoder = new TextDecoder(); + +export interface HostPermissionPort { + postMessage(message: unknown, transfer: Transferable[]): void; +} + +/** + * Byte range of the SCALE `str` request id heading a wire frame, or `null` + * when the frame is truncated. Reads the header only, so routing a large + * frame never copies its payload. + */ +function requestIdRange(frame: Uint8Array): [number, number] | null { + const first = frame[0]; + const second = frame[1]; + const third = frame[2]; + const fourth = frame[3]; + if (first === undefined || second === undefined || third === undefined || fourth === undefined) { + return null; + } + let length: number; + let start: number; + switch (first & 3) { + case 0: + length = first >>> 2; + start = 1; + break; + case 1: + length = (first | (second << 8)) >>> 2; + start = 2; + break; + case 2: + length = (first | (second << 8) | (third << 16) | (fourth << 24)) >>> 2; + start = 4; + break; + default: + return null; + } + const end = start + length; + return frame.length < end + 3 ? null : [start, end]; +} + +/** Trait id of a wire frame without copying its payload; `undefined` when truncated. */ +export function wireFrameTraitId(frame: Uint8Array): number | undefined { + const range = requestIdRange(frame); + return range === null ? undefined : frame[range[1]]; +} + +/** Menu lines for the JAM networks this execution may reach; empty when none. */ +export function jamPeersGrantText(granted: readonly string[]): string[] { + if (granted.length === 0) { + return []; + } + return [ + ...granted.map( + genesis => + `JAM network ${genesis}: read-only peer access (WebTransport) to its validators, granted for this app and closed when it stops.`, + ), + 'Limits: 8 connections, 16 streams per connection, 1 MiB messages. Received bytes are unverified until the app checks them.', + 'This access carries no account, signing, storage or web access.', + ]; +} + +/** + * Asks the host for `RemotePermission::JamPeers { genesis }` on behalf of the + * execution-local JamPeerTransport session. Replies to its own requests never + * reach the guest. + */ +export class JamPeersPermissionRequester { + private readonly port: HostPermissionPort; + private readonly pending = new Map void>(); + private readonly grantedGenesis = new Set(); + private closed = false; + + constructor(port: HostPermissionPort) { + this.port = port; + } + + /** JamPeerTransport `authorize` callback: resolves whether the host granted `genesis`. */ + readonly authorize = (genesis: string): Promise => { + if (this.closed) { + return Promise.resolve(false); + } + const nonce = crypto.getRandomValues(new Uint8Array(16)); + const requestId = REQUEST_ID_PREFIX + Array.from(nonce, byte => byte.toString(16).padStart(2, '0')).join(''); + const encoded = encodeWireMessage({ + requestId, + payload: { + traitId: PERMISSIONS_REQUEST_REMOTE_PERMISSION.trait, + methodId: PERMISSIONS_REQUEST_REMOTE_PERMISSION.method, + messageType: MESSAGE_TYPE_REQUEST, + value: VersionedRemotePermissionRequest.enc({ + tag: 'V1', + value: { + permission: { + tag: 'JamPeers', + value: { genesis: S.toHexString(genesis) }, + }, + }, + }), + }, + }); + if (encoded.isErr()) { + return Promise.reject(encoded.error); + } + const { promise, resolve } = Promise.withResolvers(); + this.pending.set(requestId, granted => { + if (granted) { + this.grantedGenesis.add(genesis); + } + resolve(granted); + }); + this.port.postMessage(encoded.value, []); + return promise; + }; + + /** + * Consume `frame` when it answers one of this requester's requests. Every + * other frame belongs to the guest and is left untouched. Throws, after + * refusing the request, when the host's reply to it does not decode. + */ + claim(frame: Uint8Array): boolean { + if (this.pending.size === 0) { + return false; + } + const range = requestIdRange(frame); + if (range === null || range[1] - range[0] !== REQUEST_ID_BYTES) { + return false; + } + const requestId = textDecoder.decode(frame.subarray(range[0], range[1])); + const settle = this.pending.get(requestId); + if (settle === undefined) { + return false; + } + this.pending.delete(requestId); + let granted = false; + try { + const decoded = decodeWireMessage(frame); + if (decoded.isErr()) { + throw decoded.error; + } + const { payload } = decoded.value; + // A protocol error or any other reply to this id grants nothing. + if ( + payload.traitId === PERMISSIONS_REQUEST_REMOTE_PERMISSION.trait && + payload.methodId === PERMISSIONS_REQUEST_REMOTE_PERMISSION.method && + payload.messageType === MESSAGE_TYPE_RESPONSE + ) { + const result = remotePermissionResult.dec(payload.value); + granted = result.success && result.value.value.granted; + } + } catch (error) { + settle(false); + throw new Error('Host returned a malformed JAM peers permission reply', { + cause: error, + }); + } + settle(granted); + return true; + } + + /** Genesis hashes the host granted to this execution, in grant order. */ + granted(): string[] { + return [...this.grantedGenesis]; + } + + /** Refuse outstanding and future requests when the execution stops. */ + close(): void { + this.closed = true; + for (const settle of this.pending.values()) { + settle(false); + } + this.pending.clear(); + } +} diff --git a/apps/sandbox/src/polkavm-runtime.ts b/apps/sandbox/src/polkavm-runtime.ts index c341be58..f72e58d7 100644 --- a/apps/sandbox/src/polkavm-runtime.ts +++ b/apps/sandbox/src/polkavm-runtime.ts @@ -3,6 +3,13 @@ import type { ArchiveFiles } from '@dotli/content'; import type { PolkaVmDebugMessage, PolkaVmDebugSnapshot } from '@dotli/truapi-debug'; +import { + createJamPeerTransportSession, + JAM_PEER_TRANSPORT_MAX_FRAME_BYTES, + type JamPeerTransportSession, +} from '@parity/truapi/jam-peer-transport'; +import { JAM_PEER_TRANSPORT_DIAL, SYSTEM_HANDSHAKE } from '@parity/truapi/wire-table'; +import { jamPeersGrantText, JamPeersPermissionRequester, wireFrameTraitId } from './polkavm-peer-permission.js'; import { POLKAVM_RUNTIME_SOURCE, polkaVmRuntimeAssetUrl } from './polkavm-runtime-assets.js'; import { Tri2dRenderer } from './tri2d-renderer.js'; import { installPolkaVmMenu, type PolkaVmMenu } from './polkavm-menu.js'; @@ -18,7 +25,9 @@ const MAX_AUDIO_BYTES = 48_000 * 2 * 2; const MAX_SAVE_BYTES = 1024 * 1024; const MAX_TRANSLATED_WASM_BYTES = 16 * 1024 * 1024; const MAX_HOST_FRAME_BYTES = 1024 * 1024; -const MAX_PENDING_HOST_FRAMES = 32; +// A JamPeerTransport guest keeps several requests in flight per tick (one recv +// per stream plus events); the byte bound below is what limits memory. +const MAX_PENDING_HOST_FRAMES = 256; const MAX_PENDING_HOST_FRAME_BYTES = 4 * 1024 * 1024; const MAX_UI_OUTPUT_COMMANDS = 64; const MAX_UI_COPY_TEXT_BYTES = 64 * 1024; @@ -980,6 +989,47 @@ export interface HostFrameResponseTarget { postMessage(message: unknown, transfer: Transferable[]): void; } +/** + * Route one guest host frame. Every frame goes to the authenticated host port + * except `JamPeerTransport` (trait 23) requests, which the execution-local peer + * session answers once the host has granted the dialed JAM network. The + * handshake is the one frame both must see: the peer session negotiates on a + * copy and its reply is dropped, so the guest only ever observes the host's + * answer. + * + * Returns `false` when the frame exceeds the bound for its route. Only a + * JamPeerTransport frame may exceed `MAX_HOST_FRAME_BYTES`, and then only up + * to a `send` of one maximal message. + */ +export function dispatchHostFrame( + request: Uint8Array, + hostFramePort: HostFrameResponseTarget, + peerSession: JamPeerTransportSession, + onPeerResponse: (response: Uint8Array) => void, + onPeerError: (error: Error) => void, +): boolean { + const trait = wireFrameTraitId(request); + if (trait === JAM_PEER_TRANSPORT_DIAL.trait) { + if (request.byteLength > JAM_PEER_TRANSPORT_MAX_FRAME_BYTES) { + return false; + } + void peerSession.handleFrame(request).then(onPeerResponse, (error: unknown) => { + onPeerError(error instanceof Error ? error : new Error('JamPeerTransport frame dispatch failed')); + }); + return true; + } + if (request.byteLength > MAX_HOST_FRAME_BYTES) { + return false; + } + if (trait === SYSTEM_HANDSHAKE.trait) { + // The session refuses a malformed handshake itself; the host's verdict on + // the same bytes is the one the guest receives. + void peerSession.handleFrame(request.slice()).catch(() => undefined); + } + hostFramePort.postMessage(request, [request.buffer]); + return true; +} + export interface HostFrameResponseQueueOptions { maxResponses?: number; maxBytes?: number; @@ -2603,6 +2653,7 @@ export async function runPolkaVmApplication( const menu = installPolkaVmMenu(surface, canvas, descriptor.controls, { pause: () => undefined, hasFileInput: descriptor.fileInputHandlers.length > 0, + grants: () => [], error: error instanceof Error ? error.message : 'Application startup failed.', retry: () => { void launch(nextFiles); @@ -2706,6 +2757,15 @@ async function startPolkaVmApplication( reject: rejectStarted, } = Promise.withResolvers(); const hostFramePort = await waitForTruapiPort(window, window.parent, parentOrigin); + // Every application may dial a JAM network, but only after the host grants + // `RemotePermission::JamPeers { genesis }` for this product. The request + // travels over the authenticated host port with the sandbox's own request + // id and its reply never reaches the guest. The grant is execution-local + // and carries no account, signing, storage or arbitrary-URL authority. + const jamPeersPermission = new JamPeersPermissionRequester(hostFramePort); + const peerSession = createJamPeerTransportSession({ + authorize: jamPeersPermission.authorize, + }); const worker = new Worker(polkaVmRuntimeAssetUrl('polkavm-worker.js')); const closeHostFramePort = (): void => { hostFramePort.onmessage = null; @@ -2720,6 +2780,8 @@ async function startPolkaVmApplication( let failRuntime = (error: Error): void => { status.textContent = error.message; rejectStarted(error); + jamPeersPermission.close(); + peerSession.close(); worker.postMessage({ type: 'stop' }); worker.terminate(); closeHostFramePort(); @@ -2737,6 +2799,14 @@ async function startPolkaVmApplication( failHostFrame(new Error('Host returned an invalid host frame')); return; } + try { + if (jamPeersPermission.claim(event.data)) { + return; + } + } catch (error) { + failHostFrame(error instanceof Error ? error : new Error(String(error))); + return; + } canvas.dataset['polkavmHostFrameResponses'] = String(Number(canvas.dataset['polkavmHostFrameResponses']) + 1); hostFrameQueue.enqueue(event.data); }; @@ -3142,6 +3212,8 @@ async function startPolkaVmApplication( worker.terminate(); webGpu?.dispose(); void audioContext?.close(); + jamPeersPermission.close(); + peerSession.close(); closeHostFramePort(); hostFrameQueue.close(); }; @@ -3222,6 +3294,7 @@ async function startPolkaVmApplication( syncPause(); }, hasFileInput: descriptor.fileInputHandlers.length > 0, + grants: () => jamPeersGrantText(jamPeersPermission.granted()), retry: () => { resolveStarted(undefined); stop(); @@ -3447,13 +3520,35 @@ async function startPolkaVmApplication( } case 'host-frame-request': { const bytes = message['bytes']; - if (!(bytes instanceof Uint8Array) || bytes.byteLength === 0 || bytes.byteLength > MAX_HOST_FRAME_BYTES) { + if ( + !(bytes instanceof Uint8Array) || + bytes.byteLength === 0 || + bytes.byteLength > JAM_PEER_TRANSPORT_MAX_FRAME_BYTES + ) { failRuntime(new Error('PolkaVM guest emitted an invalid host frame')); return; } const request = ownedBytes(bytes); canvas.dataset['polkavmHostFrameRequests'] = String(Number(canvas.dataset['polkavmHostFrameRequests']) + 1); - hostFramePort.postMessage(request, [request.buffer]); + const routed = dispatchHostFrame( + request, + hostFramePort, + peerSession, + response => { + if (stopped || response.byteLength === 0) { + return; + } + canvas.dataset['polkavmHostFrameResponses'] = String( + Number(canvas.dataset['polkavmHostFrameResponses']) + 1, + ); + hostFrameQueue.enqueue(response); + }, + failRuntime, + ); + if (!routed) { + failRuntime(new Error('PolkaVM guest emitted an invalid host frame')); + return; + } break; } case 'frame': { diff --git a/package-lock.json b/package-lock.json index 981aaf3a..365f2575 100644 --- a/package-lock.json +++ b/package-lock.json @@ -109,6 +109,7 @@ "@dotli/storage": "*", "@dotli/truapi-debug": "*", "@dotli/ui": "*", + "@parity/truapi": "file:../../vendor/truapi", "@sentry/browser": "^11.1.0", "@sentry/vite-plugin": "^5.4.0" }, diff --git a/packages/ui/src/host-callbacks/PromptPermission.ts b/packages/ui/src/host-callbacks/PromptPermission.ts index 205a3a7f..8bd578fe 100644 --- a/packages/ui/src/host-callbacks/PromptPermission.ts +++ b/packages/ui/src/host-callbacks/PromptPermission.ts @@ -3,12 +3,12 @@ // user takes to dismiss it. Device grants also schedule an iframe reload so // the browser sees the refreshed Permissions Policy `allow` attribute. // -// "Always allow" and "Deny" are durable, matching the grant the topbar -// permissions menu shows and resets. "Allow once" is kept by the core for the -// current execution and consumed by the next operation that needs it, so it -// is offered only where the core is that gate: the submit permissions and -// Notifications. A grant gated by the iframe `allow` attribute reloads the -// product into a new execution, which would drop a one-time grant. +// "Always allow" and "Deny" are durable. Generic permission grants appear in +// the topbar permissions menu; JAM peer decisions are keyed by product and +// genesis in the core. Submit and notification one-time grants are consumed +// by the next operation. A JAM peer one-time grant authorizes the running +// peer session. Iframe `allow`-gated permissions offer no one-time grant: +// granting reloads the product into a new execution. // Auto-grants answer `AllowOnce` so the core records nothing the user never // saw. Each instance serves one product, so the product the core passes is // already known as `label`. @@ -23,7 +23,7 @@ import { setPermissionStatus, type EnforceablePermissionName, } from '../permissions.js'; -import { showPermissionRequestModal } from '../permission-modal.js'; +import { showJamPeersPermissionModal, showPermissionRequestModal } from '../permission-modal.js'; import { showNotification } from '../notification.js'; import { createBlockingModalScope, throwIfAborted, type BlockingModalScope } from '../blocking-modal-queue.js'; import { createSubmitRateLimiter, type SubmitRateLimiter } from './rate-limit.js'; @@ -33,7 +33,10 @@ import { recordPermissionChange } from '../state/permissions.js'; // Remote tags that don't reach a host enforcement point: WebRtc is gated // by the iframe `allow` attribute, and `Remote` (HTTP/WS) can't be // reliably intercepted from inside the sandbox. Auto-grant either. -function gatedRemotePermissionName(tag: RemotePermission['tag']): EnforceablePermissionName | null { +// `JamPeers` carries its genesis and has its own prompt. +function gatedRemotePermissionName( + tag: Exclude, +): EnforceablePermissionName | null { switch (tag) { case 'ChainSubmit': case 'PreimageSubmit': @@ -60,7 +63,16 @@ export function createPromptPermission( }; const remotePermission: Permissions['remotePermission'] = async (_product, request) => { - const name = gatedRemotePermissionName(request.permission.tag); + const { permission } = request; + if (permission.tag === 'JamPeers') { + return modalScope.enqueue(signal => + decideJamPeersPermission(label, permission.value.genesis, { + limiter, + signal, + }), + ); + } + const name = gatedRemotePermissionName(permission.tag); if (name === null) { return 'AllowOnce'; } @@ -70,6 +82,33 @@ export function createPromptPermission( return { devicePermission, remotePermission }; } +// The core asks only while the product's stored decision for this genesis is +// undetermined, and itself persists "Always allow" and "Deny" per product and +// genesis, so the next dial of that network in any execution is answered +// without a prompt. A dismissal stores nothing. +async function decideJamPeersPermission( + label: string, + genesis: string, + options: { limiter: { allow: () => boolean }; signal: AbortSignal }, +): Promise { + const { limiter, signal } = options; + if (!limiter.allow()) { + throw new Error(ERRORS.PERMISSION_PROMPT_RATE_LIMITED); + } + const decision = await showJamPeersPermissionModal(label, genesis, signal); + throwIfAborted(signal); + switch (decision) { + case 'dismissed': + throw new Error(ERRORS.PERMISSION_DIALOG_DISMISSED); + case 'denied': + return 'Deny'; + case 'granted': + return 'AllowAlways'; + case 'granted-once': + return 'AllowOnce'; + } +} + interface PromptOptions { kind: 'Device' | 'Remote'; limiter: { allow: () => boolean }; diff --git a/packages/ui/src/permission-modal.ts b/packages/ui/src/permission-modal.ts index 2cef7092..aea454c8 100644 --- a/packages/ui/src/permission-modal.ts +++ b/packages/ui/src/permission-modal.ts @@ -13,8 +13,9 @@ import type { ModalButton } from './state/modals.js'; // variants (Camera, Microphone, Location, Bluetooth, NFC, Clipboard, // Biometrics, Notifications), identity disclosure, // and the internal submitted gates (ChainSubmit, PreimageSubmit, -// StatementSubmit). `OpenUrl` is auto-granted at the container level and never -// reaches this modal. +// StatementSubmit), plus JAM peer access (`JamPeers`), which names the JAM +// network it covers. `OpenUrl` is auto-granted at the container level and +// never reaches this modal. // Returns an explicit decision so callers can distinguish "Deny" from // dismissing the dialog without storing a denial. With `allowOnce`, the prompt // also offers a one-time grant and highlights it over "Always allow". @@ -94,6 +95,26 @@ const PERMISSION_ICONS: Record = { '', }; +const JAM_PEERS_ICON = + '' + + '' + + '' + + ''; + +/** The question asked before an app may reach the validators of one JAM network. */ +export function jamPeersPermissionText(label: string, genesis: string): string { + return `Allow ${withActiveTld(label)} to connect to JAM network ${genesis.slice(0, 10)}… (read-only peer access, no accounts or signing)?`; +} + +interface PermissionPrompt { + icon: string; + description: string; + /** Full network identity, displayed separately from the abbreviated question. */ + detail?: string; + /** Granting reloads the application (iframe `allow`-gated permissions). */ + reloads: boolean; +} + export type PermissionPromptDecision = 'granted' | 'granted-once' | 'denied' | 'dismissed'; export interface PermissionRequestModalOptions { @@ -109,6 +130,43 @@ export async function showPermissionRequestModal( permission: EnforceablePermissionName, signal?: AbortSignal, options: PermissionRequestModalOptions = {}, +): Promise { + return showPermissionPrompt( + label, + { + icon: PERMISSION_ICONS[permission], + description: PERMISSION_DESCRIPTIONS[permission], + reloads: isDevicePermission(permission), + }, + signal, + options, + ); +} + +/** The shared Solid dialog asks for a grant scoped to this product and genesis. */ +export function showJamPeersPermissionModal( + label: string, + genesis: string, + signal?: AbortSignal, +): Promise { + return showPermissionPrompt( + label, + { + icon: JAM_PEERS_ICON, + description: jamPeersPermissionText(label, genesis), + detail: genesis, + reloads: false, + }, + signal, + { allowOnce: true }, + ); +} + +async function showPermissionPrompt( + label: string, + prompt: PermissionPrompt, + signal: AbortSignal | undefined, + options: PermissionRequestModalOptions, ): Promise { const allowOnce = options.allowOnce === true; const buttons: ModalButton[] = [ @@ -126,13 +184,14 @@ export async function showPermissionRequestModal( } const { result } = await presentModal( { - icon: PERMISSION_ICONS[permission], + icon: prompt.icon, title: 'Permission Request', fields: [ { label: 'Application', value: withActiveTld(label) }, - { label: 'Permission', value: PERMISSION_DESCRIPTIONS[permission] }, + { label: 'Permission', value: prompt.description }, + ...(prompt.detail === undefined ? [] : [{ label: 'JAM network genesis', value: prompt.detail, mono: true }]), ], - ...(isDevicePermission(permission) ? { notice: 'Granting this permission will reload the application.' } : {}), + ...(prompt.reloads ? { notice: 'Granting this permission will reload the application.' } : {}), buttons, dismissOnBackdrop: true, dismissResult: 'dismissed', diff --git a/packages/ui/tests/permissions.test.ts b/packages/ui/tests/permissions.test.ts index b401347f..637f3c94 100644 --- a/packages/ui/tests/permissions.test.ts +++ b/packages/ui/tests/permissions.test.ts @@ -430,6 +430,39 @@ describe('three-way permission prompts', () => { expect(await getPermissionStatus('myapp', 'ChainSubmit')).toBe('denied'); }); + it('As a dotli user, I am asked which JAM network an app may reach', async () => { + const genesis = `0x3539${'ab'.repeat(30)}` as const; + for (const [button, decision] of [ + ['Always allow', 'AllowAlways'], + ['Allow once', 'AllowOnce'], + ['Deny', 'Deny'], + ] as const) { + // Given + const response = createPromptPermission('myapp').remotePermission(PRODUCT, { + permission: { tag: 'JamPeers', value: { genesis } }, + }); + await vi.waitFor(() => { + expect(promptButtonTexts()).toContain(button); + }); + const values = [...document.querySelectorAll('.signing-field-value')]; + expect(values.some(field => field.textContent === genesis)).toBe(true); + expect(document.querySelector('.permission-modal-notice')).toBeNull(); + // When + await clickPromptButton(button); + + // Then + await expect(response).resolves.toBe(decision); + } + const dismissed = createPromptPermission('myapp').remotePermission(PRODUCT, { + permission: { tag: 'JamPeers', value: { genesis } }, + }); + await vi.waitFor(() => { + expect(document.querySelector('.signing-modal-backdrop')).not.toBeNull(); + }); + document.querySelector('.signing-modal-backdrop')?.click(); + await expect(dismissed).rejects.toThrow('User dismissed permission dialog'); + }); + it('As a dotli user, I can allow a single notification', async () => { // Given const response = createPromptPermission('myapp').devicePermission(PRODUCT, 'Notifications'); diff --git a/vendor/truapi-host.lock.json b/vendor/truapi-host.lock.json index 63a04f17..2002834e 100644 --- a/vendor/truapi-host.lock.json +++ b/vendor/truapi-host.lock.json @@ -1,27 +1,27 @@ { "schemaVersion": 1, "upstreamRepository": "https://github.com/paritytech/trinity-user-agents", - "upstreamBranch": "feat/pvm-app-runtime", - "upstreamRevision": "1385ae2b7a1ce8dc89a0487a3e777bc28dd93428", + "upstreamBranch": "feat/pvm-peer-transport", + "upstreamRevision": "c923399a35494aeab8af75d4c8e2956d5c60bc4b", "packages": { "vendor/truapi": { "name": "@parity/truapi", "version": "0.23.0", - "sourceArchiveSha256": "d00a6100fddd4146b8891a8406664b611c0783355edf510df100d2fc733dbcbb", - "clientSha256": "1b0ed507ab520f3dbe50e0188447eb6f5f80b0e21d134dc532d66a3a955b4bf8" + "sourceArchiveSha256": "d48ba342a1b618d2c19c787fd071978943b174b017e1423aca4d382403ccc4b5", + "clientSha256": "059ccfe8df2c9f42868ffb7549c4884e9105ce6be3487ac2085843bb07a19a6b" }, "vendor/truapi-host": { "name": "@parity/truapi-host", "version": "0.23.0", - "sourceArchiveSha256": "8f6c5244b0a1265cb08b5170fa299173e645b5396d3c37ddef4fea521c7413f6", + "sourceArchiveSha256": "66983b25656fdd8652b3af41226c5aaded8c6592c0a88704f86d0754ac211e02", "dependencyOverride": "@parity/truapi=file:../truapi", - "wasmSha256": "b3babf2c32a9eff5768df775cdc4177958441ca0f3657ed11255a09eece97cbd", - "testingWasmSha256": "7809b919e07ef2de2dcf72d275dfee71cc11091b606dc19939f6316c301c0137", + "wasmSha256": "5ec06b6ecd19bfb177cc21e0f0551b4f3ebe9e10d07a918cfe93ad02c2ab1adb", "wasmFeatures": [ "wasm-signing-host" - ] + ], + "testingWasmSha256": "8735e69b54dbedc500c9affc861f38542ce65c81343d5d4e38212157713eac70" } }, - "wasmUpstreamRevision": "1385ae2b7a1ce8dc89a0487a3e777bc28dd93428", - "pullRequest": "https://github.com/paritytech/trinity-user-agents/pull/540" + "wasmUpstreamRevision": "c923399a35494aeab8af75d4c8e2956d5c60bc4b", + "pullRequest": "https://github.com/paritytech/trinity-user-agents/pull/1010" } diff --git a/vendor/truapi-host/dist/wasm/testing/truapi_server.d.ts b/vendor/truapi-host/dist/wasm/testing/truapi_server.d.ts index 49738a6b..4c778981 100644 --- a/vendor/truapi-host/dist/wasm/testing/truapi_server.d.ts +++ b/vendor/truapi-host/dist/wasm/testing/truapi_server.d.ts @@ -457,12 +457,12 @@ export interface InitOutput { readonly wasmsigninghostruntime_setPermissionAuthorizationStatus: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => number; readonly wasmsigninghostruntime_setWithheldResources: (a: number, b: number, c: number) => void; readonly wireSchemaHash: (a: number) => void; - readonly __wasm_bindgen_func_elem_6904: (a: number, b: number, c: number, d: number) => void; - readonly __wasm_bindgen_func_elem_6962: (a: number, b: number, c: number, d: number) => void; + readonly __wasm_bindgen_func_elem_6946: (a: number, b: number, c: number, d: number) => void; + readonly __wasm_bindgen_func_elem_7004: (a: number, b: number, c: number, d: number) => void; + readonly __wasm_bindgen_func_elem_2977: (a: number, b: number, c: number) => void; readonly __wasm_bindgen_func_elem_2970: (a: number, b: number, c: number) => void; - readonly __wasm_bindgen_func_elem_2963: (a: number, b: number, c: number) => void; - readonly __wasm_bindgen_func_elem_6784: (a: number, b: number) => void; - readonly __wasm_bindgen_func_elem_2967: (a: number, b: number) => void; + readonly __wasm_bindgen_func_elem_6826: (a: number, b: number) => void; + readonly __wasm_bindgen_func_elem_2974: (a: number, b: number) => void; readonly __wbindgen_export: (a: number, b: number) => number; readonly __wbindgen_export2: (a: number, b: number, c: number, d: number) => number; readonly __wbindgen_export3: (a: number) => void; diff --git a/vendor/truapi-host/dist/wasm/testing/truapi_server.js b/vendor/truapi-host/dist/wasm/testing/truapi_server.js index 01233dcf..227bb9de 100644 --- a/vendor/truapi-host/dist/wasm/testing/truapi_server.js +++ b/vendor/truapi-host/dist/wasm/testing/truapi_server.js @@ -1238,7 +1238,7 @@ function __wbg_get_imports() { const a = state0.a; state0.a = 0; try { - return __wasm_bindgen_func_elem_6962(a, state0.b, arg0, arg1); + return __wasm_bindgen_func_elem_7004(a, state0.b, arg0, arg1); } finally { state0.a = a; } @@ -1376,27 +1376,27 @@ function __wbg_get_imports() { }, __wbindgen_cast_0000000000000001: function(arg0, arg1) { // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 338, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`. - const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_6904); + const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_6946); return addHeapObject(ret); }, __wbindgen_cast_0000000000000002: function(arg0, arg1) { // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 85, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`. - const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_2970); + const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_2977); return addHeapObject(ret); }, __wbindgen_cast_0000000000000003: function(arg0, arg1) { // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [], shim_idx: 199, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`. - const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_6784); + const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_6826); return addHeapObject(ret); }, __wbindgen_cast_0000000000000004: function(arg0, arg1) { // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [], shim_idx: 81, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: false }) -> Externref`. - const ret = makeClosure(arg0, arg1, __wasm_bindgen_func_elem_2963); + const ret = makeClosure(arg0, arg1, __wasm_bindgen_func_elem_2970); return addHeapObject(ret); }, __wbindgen_cast_0000000000000005: function(arg0, arg1) { // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [], shim_idx: 83, ret: Unit, inner_ret: Some(Unit) }, mutable: false }) -> Externref`. - const ret = makeClosure(arg0, arg1, __wasm_bindgen_func_elem_2967); + const ret = makeClosure(arg0, arg1, __wasm_bindgen_func_elem_2974); return addHeapObject(ret); }, __wbindgen_cast_0000000000000006: function(arg0) { @@ -1435,22 +1435,22 @@ function __wbg_get_imports() { }; } -function __wasm_bindgen_func_elem_6784(arg0, arg1) { - wasm.__wasm_bindgen_func_elem_6784(arg0, arg1); +function __wasm_bindgen_func_elem_6826(arg0, arg1) { + wasm.__wasm_bindgen_func_elem_6826(arg0, arg1); } -function __wasm_bindgen_func_elem_2967(arg0, arg1) { - wasm.__wasm_bindgen_func_elem_2967(arg0, arg1); +function __wasm_bindgen_func_elem_2974(arg0, arg1) { + wasm.__wasm_bindgen_func_elem_2974(arg0, arg1); } -function __wasm_bindgen_func_elem_2970(arg0, arg1, arg2) { - wasm.__wasm_bindgen_func_elem_2970(arg0, arg1, addHeapObject(arg2)); +function __wasm_bindgen_func_elem_2977(arg0, arg1, arg2) { + wasm.__wasm_bindgen_func_elem_2977(arg0, arg1, addHeapObject(arg2)); } -function __wasm_bindgen_func_elem_2963(arg0, arg1) { +function __wasm_bindgen_func_elem_2970(arg0, arg1) { try { const retptr = wasm.__wbindgen_add_to_stack_pointer(-16); - wasm.__wasm_bindgen_func_elem_2963(retptr, arg0, arg1); + wasm.__wasm_bindgen_func_elem_2970(retptr, arg0, arg1); var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true); var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true); if (r1) { @@ -1461,10 +1461,10 @@ function __wasm_bindgen_func_elem_2963(arg0, arg1) { } } -function __wasm_bindgen_func_elem_6904(arg0, arg1, arg2) { +function __wasm_bindgen_func_elem_6946(arg0, arg1, arg2) { try { const retptr = wasm.__wbindgen_add_to_stack_pointer(-16); - wasm.__wasm_bindgen_func_elem_6904(retptr, arg0, arg1, addHeapObject(arg2)); + wasm.__wasm_bindgen_func_elem_6946(retptr, arg0, arg1, addHeapObject(arg2)); var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true); var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true); if (r1) { @@ -1475,8 +1475,8 @@ function __wasm_bindgen_func_elem_6904(arg0, arg1, arg2) { } } -function __wasm_bindgen_func_elem_6962(arg0, arg1, arg2, arg3) { - wasm.__wasm_bindgen_func_elem_6962(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3)); +function __wasm_bindgen_func_elem_7004(arg0, arg1, arg2, arg3) { + wasm.__wasm_bindgen_func_elem_7004(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3)); } const WasmPairingHostRuntimeFinalization = (typeof FinalizationRegistry === 'undefined') diff --git a/vendor/truapi-host/dist/wasm/testing/truapi_server_bg.wasm b/vendor/truapi-host/dist/wasm/testing/truapi_server_bg.wasm index 85376b5f..a20c47a9 100644 Binary files a/vendor/truapi-host/dist/wasm/testing/truapi_server_bg.wasm and b/vendor/truapi-host/dist/wasm/testing/truapi_server_bg.wasm differ diff --git a/vendor/truapi-host/dist/wasm/testing/truapi_server_bg.wasm.d.ts b/vendor/truapi-host/dist/wasm/testing/truapi_server_bg.wasm.d.ts index 0b15ca42..f4c8c9c9 100644 --- a/vendor/truapi-host/dist/wasm/testing/truapi_server_bg.wasm.d.ts +++ b/vendor/truapi-host/dist/wasm/testing/truapi_server_bg.wasm.d.ts @@ -66,12 +66,12 @@ export const wasmsigninghostruntime_setGrantAllowancesUnchecked: (a: number, b: export const wasmsigninghostruntime_setPermissionAuthorizationStatus: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => number; export const wasmsigninghostruntime_setWithheldResources: (a: number, b: number, c: number) => void; export const wireSchemaHash: (a: number) => void; -export const __wasm_bindgen_func_elem_6904: (a: number, b: number, c: number, d: number) => void; -export const __wasm_bindgen_func_elem_6962: (a: number, b: number, c: number, d: number) => void; +export const __wasm_bindgen_func_elem_6946: (a: number, b: number, c: number, d: number) => void; +export const __wasm_bindgen_func_elem_7004: (a: number, b: number, c: number, d: number) => void; +export const __wasm_bindgen_func_elem_2977: (a: number, b: number, c: number) => void; export const __wasm_bindgen_func_elem_2970: (a: number, b: number, c: number) => void; -export const __wasm_bindgen_func_elem_2963: (a: number, b: number, c: number) => void; -export const __wasm_bindgen_func_elem_6784: (a: number, b: number) => void; -export const __wasm_bindgen_func_elem_2967: (a: number, b: number) => void; +export const __wasm_bindgen_func_elem_6826: (a: number, b: number) => void; +export const __wasm_bindgen_func_elem_2974: (a: number, b: number) => void; export const __wbindgen_export: (a: number, b: number) => number; export const __wbindgen_export2: (a: number, b: number, c: number, d: number) => number; export const __wbindgen_export3: (a: number) => void; diff --git a/vendor/truapi-host/dist/wasm/web/truapi_server.d.ts b/vendor/truapi-host/dist/wasm/web/truapi_server.d.ts index 58734285..d799475c 100644 --- a/vendor/truapi-host/dist/wasm/web/truapi_server.d.ts +++ b/vendor/truapi-host/dist/wasm/web/truapi_server.d.ts @@ -427,12 +427,12 @@ export interface InitOutput { readonly wasmsigninghostruntime_sessionChatIdentityKey: (a: number, b: number) => void; readonly wasmsigninghostruntime_setPermissionAuthorizationStatus: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => number; readonly wireSchemaHash: (a: number) => void; - readonly __wasm_bindgen_func_elem_6887: (a: number, b: number, c: number, d: number) => void; - readonly __wasm_bindgen_func_elem_6945: (a: number, b: number, c: number, d: number) => void; + readonly __wasm_bindgen_func_elem_6929: (a: number, b: number, c: number, d: number) => void; + readonly __wasm_bindgen_func_elem_6987: (a: number, b: number, c: number, d: number) => void; + readonly __wasm_bindgen_func_elem_2970: (a: number, b: number, c: number) => void; readonly __wasm_bindgen_func_elem_2963: (a: number, b: number, c: number) => void; - readonly __wasm_bindgen_func_elem_2956: (a: number, b: number, c: number) => void; - readonly __wasm_bindgen_func_elem_6767: (a: number, b: number) => void; - readonly __wasm_bindgen_func_elem_2960: (a: number, b: number) => void; + readonly __wasm_bindgen_func_elem_6809: (a: number, b: number) => void; + readonly __wasm_bindgen_func_elem_2967: (a: number, b: number) => void; readonly __wbindgen_export: (a: number, b: number) => number; readonly __wbindgen_export2: (a: number, b: number, c: number, d: number) => number; readonly __wbindgen_export3: (a: number) => void; diff --git a/vendor/truapi-host/dist/wasm/web/truapi_server.js b/vendor/truapi-host/dist/wasm/web/truapi_server.js index 59ee909e..550ff2c6 100644 --- a/vendor/truapi-host/dist/wasm/web/truapi_server.js +++ b/vendor/truapi-host/dist/wasm/web/truapi_server.js @@ -1196,7 +1196,7 @@ function __wbg_get_imports() { const a = state0.a; state0.a = 0; try { - return __wasm_bindgen_func_elem_6945(a, state0.b, arg0, arg1); + return __wasm_bindgen_func_elem_6987(a, state0.b, arg0, arg1); } finally { state0.a = a; } @@ -1334,27 +1334,27 @@ function __wbg_get_imports() { }, __wbindgen_cast_0000000000000001: function(arg0, arg1) { // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 338, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`. - const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_6887); + const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_6929); return addHeapObject(ret); }, __wbindgen_cast_0000000000000002: function(arg0, arg1) { // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 85, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`. - const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_2963); + const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_2970); return addHeapObject(ret); }, __wbindgen_cast_0000000000000003: function(arg0, arg1) { // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [], shim_idx: 200, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`. - const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_6767); + const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_6809); return addHeapObject(ret); }, __wbindgen_cast_0000000000000004: function(arg0, arg1) { // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [], shim_idx: 81, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: false }) -> Externref`. - const ret = makeClosure(arg0, arg1, __wasm_bindgen_func_elem_2956); + const ret = makeClosure(arg0, arg1, __wasm_bindgen_func_elem_2963); return addHeapObject(ret); }, __wbindgen_cast_0000000000000005: function(arg0, arg1) { // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [], shim_idx: 83, ret: Unit, inner_ret: Some(Unit) }, mutable: false }) -> Externref`. - const ret = makeClosure(arg0, arg1, __wasm_bindgen_func_elem_2960); + const ret = makeClosure(arg0, arg1, __wasm_bindgen_func_elem_2967); return addHeapObject(ret); }, __wbindgen_cast_0000000000000006: function(arg0) { @@ -1393,22 +1393,22 @@ function __wbg_get_imports() { }; } -function __wasm_bindgen_func_elem_6767(arg0, arg1) { - wasm.__wasm_bindgen_func_elem_6767(arg0, arg1); +function __wasm_bindgen_func_elem_6809(arg0, arg1) { + wasm.__wasm_bindgen_func_elem_6809(arg0, arg1); } -function __wasm_bindgen_func_elem_2960(arg0, arg1) { - wasm.__wasm_bindgen_func_elem_2960(arg0, arg1); +function __wasm_bindgen_func_elem_2967(arg0, arg1) { + wasm.__wasm_bindgen_func_elem_2967(arg0, arg1); } -function __wasm_bindgen_func_elem_2963(arg0, arg1, arg2) { - wasm.__wasm_bindgen_func_elem_2963(arg0, arg1, addHeapObject(arg2)); +function __wasm_bindgen_func_elem_2970(arg0, arg1, arg2) { + wasm.__wasm_bindgen_func_elem_2970(arg0, arg1, addHeapObject(arg2)); } -function __wasm_bindgen_func_elem_2956(arg0, arg1) { +function __wasm_bindgen_func_elem_2963(arg0, arg1) { try { const retptr = wasm.__wbindgen_add_to_stack_pointer(-16); - wasm.__wasm_bindgen_func_elem_2956(retptr, arg0, arg1); + wasm.__wasm_bindgen_func_elem_2963(retptr, arg0, arg1); var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true); var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true); if (r1) { @@ -1419,10 +1419,10 @@ function __wasm_bindgen_func_elem_2956(arg0, arg1) { } } -function __wasm_bindgen_func_elem_6887(arg0, arg1, arg2) { +function __wasm_bindgen_func_elem_6929(arg0, arg1, arg2) { try { const retptr = wasm.__wbindgen_add_to_stack_pointer(-16); - wasm.__wasm_bindgen_func_elem_6887(retptr, arg0, arg1, addHeapObject(arg2)); + wasm.__wasm_bindgen_func_elem_6929(retptr, arg0, arg1, addHeapObject(arg2)); var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true); var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true); if (r1) { @@ -1433,8 +1433,8 @@ function __wasm_bindgen_func_elem_6887(arg0, arg1, arg2) { } } -function __wasm_bindgen_func_elem_6945(arg0, arg1, arg2, arg3) { - wasm.__wasm_bindgen_func_elem_6945(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3)); +function __wasm_bindgen_func_elem_6987(arg0, arg1, arg2, arg3) { + wasm.__wasm_bindgen_func_elem_6987(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3)); } const WasmPairingHostRuntimeFinalization = (typeof FinalizationRegistry === 'undefined') diff --git a/vendor/truapi-host/dist/wasm/web/truapi_server_bg.wasm b/vendor/truapi-host/dist/wasm/web/truapi_server_bg.wasm index 064f448e..a39ef21f 100644 Binary files a/vendor/truapi-host/dist/wasm/web/truapi_server_bg.wasm and b/vendor/truapi-host/dist/wasm/web/truapi_server_bg.wasm differ diff --git a/vendor/truapi-host/dist/wasm/web/truapi_server_bg.wasm.d.ts b/vendor/truapi-host/dist/wasm/web/truapi_server_bg.wasm.d.ts index 6279f8f9..06074173 100644 --- a/vendor/truapi-host/dist/wasm/web/truapi_server_bg.wasm.d.ts +++ b/vendor/truapi-host/dist/wasm/web/truapi_server_bg.wasm.d.ts @@ -63,12 +63,12 @@ export const wasmsigninghostruntime_releaseWorker: (a: number, b: number, c: num export const wasmsigninghostruntime_sessionChatIdentityKey: (a: number, b: number) => void; export const wasmsigninghostruntime_setPermissionAuthorizationStatus: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => number; export const wireSchemaHash: (a: number) => void; -export const __wasm_bindgen_func_elem_6887: (a: number, b: number, c: number, d: number) => void; -export const __wasm_bindgen_func_elem_6945: (a: number, b: number, c: number, d: number) => void; +export const __wasm_bindgen_func_elem_6929: (a: number, b: number, c: number, d: number) => void; +export const __wasm_bindgen_func_elem_6987: (a: number, b: number, c: number, d: number) => void; +export const __wasm_bindgen_func_elem_2970: (a: number, b: number, c: number) => void; export const __wasm_bindgen_func_elem_2963: (a: number, b: number, c: number) => void; -export const __wasm_bindgen_func_elem_2956: (a: number, b: number, c: number) => void; -export const __wasm_bindgen_func_elem_6767: (a: number, b: number) => void; -export const __wasm_bindgen_func_elem_2960: (a: number, b: number) => void; +export const __wasm_bindgen_func_elem_6809: (a: number, b: number) => void; +export const __wasm_bindgen_func_elem_2967: (a: number, b: number) => void; export const __wbindgen_export: (a: number, b: number) => number; export const __wbindgen_export2: (a: number, b: number, c: number, d: number) => number; export const __wbindgen_export3: (a: number) => void; diff --git a/vendor/truapi/dist/explorer/codegen/types.js b/vendor/truapi/dist/explorer/codegen/types.js index aa5d7a74..a3536842 100644 --- a/vendor/truapi/dist/explorer/codegen/types.js +++ b/vendor/truapi/dist/explorer/codegen/types.js @@ -2384,6 +2384,329 @@ export const types = [ }, ], }, + { + id: "host-jam-peer-transport-close-error", + name: "HostJamPeerTransportCloseError", + category: "jam_peer_transport", + definition: 'export type HostJamPeerTransportCloseError = "Closed";', + description: "Failure to close a connection.", + variants: [ + { + name: "Closed", + type: '{ tag: "Closed"; value?: undefined }', + description: "The connection is unknown or already closed.", + }, + ], + }, + { + id: "host-jam-peer-transport-close-request", + name: "HostJamPeerTransportCloseRequest", + category: "jam_peer_transport", + definition: "export interface HostJamPeerTransportCloseRequest {\n conn: number;\n}", + description: "Close a connection and every stream on it.", + fields: [ + { + name: "conn", + type: "number", + description: "Connection to close.", + }, + ], + }, + { + id: "host-jam-peer-transport-dial-error", + name: "HostJamPeerTransportDialError", + category: "jam_peer_transport", + definition: 'export type HostJamPeerTransportDialError = "NotGranted" | "Refused" | "Limit" | "Unreachable";', + description: "Failure to dial a JAM peer.", + variants: [ + { + name: "NotGranted", + type: '{ tag: "NotGranted"; value?: undefined }', + description: "The product holds no `RemotePermission::JamPeers` grant for the\nrequested genesis, or this host offers no peer transport.", + }, + { + name: "Refused", + type: '{ tag: "Refused"; value?: undefined }', + description: "The peer refused the connection or presented a certificate that does\nnot match the requested identity.", + }, + { + name: "Limit", + type: '{ tag: "Limit"; value?: undefined }', + description: "The connection cap for this execution is exhausted.", + }, + { + name: "Unreachable", + type: '{ tag: "Unreachable"; value?: undefined }', + description: "The endpoint could not be reached.", + }, + ], + }, + { + id: "host-jam-peer-transport-dial-request", + name: "HostJamPeerTransportDialRequest", + category: "jam_peer_transport", + definition: "export interface HostJamPeerTransportDialRequest {\n genesis: HexString;\n ip: HexString;\n port: number;\n ed25519: HexString;\n p256?: HexString;\n}", + description: "Dial one JAM peer over JAMNP-S (QUIC) or WebTransport.", + fields: [ + { + name: "genesis", + type: "HexString", + description: "Genesis header hash; the host derives the ALPN from it and requires a\n`RemotePermission::JamPeers` grant for it.", + }, + { + name: "ip", + type: "HexString", + description: "Peer IP address, IPv6 or v4-mapped IPv6.", + }, + { + name: "port", + type: "number", + description: "Peer UDP port.", + }, + { + name: "ed25519", + type: "HexString", + description: "Ed25519 key the peer's TLS certificate must carry.", + }, + { + name: "p256", + type: "HexString | undefined", + description: "Compressed P-256 peer key for WebTransport certificate hashes.", + }, + ], + }, + { + id: "host-jam-peer-transport-dial-response", + name: "HostJamPeerTransportDialResponse", + category: "jam_peer_transport", + definition: "export interface HostJamPeerTransportDialResponse {\n conn: number;\n}", + description: "An open connection handle.", + fields: [ + { + name: "conn", + type: "number", + description: "Execution-local connection id.", + }, + ], + }, + { + id: "host-jam-peer-transport-events-error", + name: "HostJamPeerTransportEventsError", + category: "jam_peer_transport", + definition: 'export type HostJamPeerTransportEventsError = "NotGranted";', + description: "Failure to drain events.", + variants: [ + { + name: "NotGranted", + type: '{ tag: "NotGranted"; value?: undefined }', + description: "This execution has no peer-transport grant.", + }, + ], + }, + { + id: "host-jam-peer-transport-events-response", + name: "HostJamPeerTransportEventsResponse", + category: "jam_peer_transport", + definition: "export interface HostJamPeerTransportEventsResponse {\n events: Array;\n}", + description: "Events in arrival order.", + fields: [ + { + name: "events", + type: "Array", + description: "Pending events; empty when nothing happened.", + }, + ], + }, + { + id: "host-jam-peer-transport-open-error", + name: "HostJamPeerTransportOpenError", + category: "jam_peer_transport", + definition: 'export type HostJamPeerTransportOpenError = "NotGranted" | "Closed" | "Limit";', + description: "Failure to open a stream.", + variants: [ + { + name: "NotGranted", + type: '{ tag: "NotGranted"; value?: undefined }', + description: "This execution has no peer-transport grant.", + }, + { + name: "Closed", + type: '{ tag: "Closed"; value?: undefined }', + description: "The connection is closed or unknown.", + }, + { + name: "Limit", + type: '{ tag: "Limit"; value?: undefined }', + description: "The stream cap for this connection is exhausted.", + }, + ], + }, + { + id: "host-jam-peer-transport-open-request", + name: "HostJamPeerTransportOpenRequest", + category: "jam_peer_transport", + definition: "export interface HostJamPeerTransportOpenRequest {\n conn: number;\n kind: number;\n}", + description: "Open a bidirectional stream and send its kind byte.", + fields: [ + { + name: "conn", + type: "number", + description: "Connection returned by `dial`.", + }, + { + name: "kind", + type: "number", + description: "JAMNP-S stream kind (UP 0, CE 128, ...).", + }, + ], + }, + { + id: "host-jam-peer-transport-open-response", + name: "HostJamPeerTransportOpenResponse", + category: "jam_peer_transport", + definition: "export interface HostJamPeerTransportOpenResponse {\n stream: number;\n}", + description: "An open stream handle.", + fields: [ + { + name: "stream", + type: "number", + description: "Execution-local stream id.", + }, + ], + }, + { + id: "host-jam-peer-transport-recv-error", + name: "HostJamPeerTransportRecvError", + category: "jam_peer_transport", + definition: 'export type HostJamPeerTransportRecvError = "Closed";', + description: "Failure to receive from a stream.", + variants: [ + { + name: "Closed", + type: '{ tag: "Closed"; value?: undefined }', + description: "The stream is unknown or already fully consumed.", + }, + ], + }, + { + id: "host-jam-peer-transport-recv-request", + name: "HostJamPeerTransportRecvRequest", + category: "jam_peer_transport", + definition: "export interface HostJamPeerTransportRecvRequest {\n stream: number;\n max: number;\n}", + description: "Poll one complete framed message without blocking.", + fields: [ + { + name: "stream", + type: "number", + description: "Stream to read from.", + }, + { + name: "max", + type: "number", + description: "Largest message the caller accepts.", + }, + ], + }, + { + id: "host-jam-peer-transport-recv-response", + name: "HostJamPeerTransportRecvResponse", + category: "jam_peer_transport", + definition: "export interface HostJamPeerTransportRecvResponse {\n message?: HexString;\n fin: boolean;\n reset: boolean;\n}", + description: "One unframed message, or none available yet.", + fields: [ + { + name: "message", + type: "HexString | undefined", + description: "Complete message bytes without length prefix, or `None` when nothing\nhas arrived yet.", + }, + { + name: "fin", + type: "boolean", + description: "The peer finished its send side; no further messages will arrive.", + }, + { + name: "reset", + type: "boolean", + description: "The peer reset the stream; buffered data may be incomplete.", + }, + ], + }, + { + id: "host-jam-peer-transport-reset-error", + name: "HostJamPeerTransportResetError", + category: "jam_peer_transport", + definition: 'export type HostJamPeerTransportResetError = "Closed";', + description: "Failure to reset a stream.", + variants: [ + { + name: "Closed", + type: '{ tag: "Closed"; value?: undefined }', + description: "The stream is unknown or already closed.", + }, + ], + }, + { + id: "host-jam-peer-transport-reset-request", + name: "HostJamPeerTransportResetRequest", + category: "jam_peer_transport", + definition: "export interface HostJamPeerTransportResetRequest {\n stream: number;\n}", + description: "Abort both directions of a stream.", + fields: [ + { + name: "stream", + type: "number", + description: "Stream to reset.", + }, + ], + }, + { + id: "host-jam-peer-transport-send-error", + name: "HostJamPeerTransportSendError", + category: "jam_peer_transport", + definition: 'export type HostJamPeerTransportSendError = "Closed" | "TooLarge" | "Limit";', + description: "Failure to send a message.", + variants: [ + { + name: "Closed", + type: '{ tag: "Closed"; value?: undefined }', + description: "The stream is closed, finished or unknown.", + }, + { + name: "TooLarge", + type: '{ tag: "TooLarge"; value?: undefined }', + description: "The message exceeds the host's message limit.", + }, + { + name: "Limit", + type: '{ tag: "Limit"; value?: undefined }', + description: "The per-connection buffer is full.", + }, + ], + }, + { + id: "host-jam-peer-transport-send-request", + name: "HostJamPeerTransportSendRequest", + category: "jam_peer_transport", + definition: "export interface HostJamPeerTransportSendRequest {\n stream: number;\n message: HexString;\n fin: boolean;\n}", + description: "Send one framed message; the host adds the `u32` little-endian length.", + fields: [ + { + name: "stream", + type: "number", + description: "Stream returned by `open` or reported by an `Accepted` event.", + }, + { + name: "message", + type: "HexString", + description: "Message bytes without length prefix.", + }, + { + name: "fin", + type: "boolean", + description: "Finish the send side after this message.", + }, + ], + }, { id: "host-local-storage-change-item", name: "HostLocalStorageChangeItem", @@ -3461,6 +3784,30 @@ export const types = [ }, ], }, + { + id: "jam-peer-transport-event", + name: "JamPeerTransportEvent", + category: "jam_peer_transport", + definition: 'export type JamPeerTransportEvent =\n | { tag: "ConnClosed"; value: { conn: number } }\n | { tag: "StreamFin"; value: { stream: number } }\n | { tag: "Accepted"; value: { conn: number; stream: number; kind: number } }\n;', + description: "Asynchronous transport notification.", + variants: [ + { + name: "ConnClosed", + type: '{ tag: "ConnClosed"; value: { conn: number } }', + description: "The connection was closed by the peer or the host.", + }, + { + name: "StreamFin", + type: '{ tag: "StreamFin"; value: { stream: number } }', + description: "The peer finished its send side of a stream.", + }, + { + name: "Accepted", + type: '{ tag: "Accepted"; value: { conn: number; stream: number; kind: number } }', + description: "The peer opened a stream to us on a dialed connection.", + }, + ], + }, { id: "legacy-account", name: "LegacyAccount", @@ -4341,8 +4688,8 @@ export const types = [ id: "remote-permission", name: "RemotePermission", category: "permissions", - definition: 'export type RemotePermission =\n | { tag: "Remote"; value: { domains: Array } }\n | { tag: "WebRtc"; value?: undefined }\n | { tag: "ChainSubmit"; value?: undefined }\n | { tag: "PreimageSubmit"; value?: undefined }\n | { tag: "StatementSubmit"; value?: undefined }\n;', - description: "One remote-operation permission requested by the product (RFC 0002).\n\n`ChainSubmit`, `PreimageSubmit`, and `StatementSubmit` are also triggered\nimplicitly by the corresponding business calls when not yet granted.", + definition: 'export type RemotePermission =\n | { tag: "Remote"; value: { domains: Array } }\n | { tag: "WebRtc"; value?: undefined }\n | { tag: "ChainSubmit"; value?: undefined }\n | { tag: "PreimageSubmit"; value?: undefined }\n | { tag: "StatementSubmit"; value?: undefined }\n | { tag: "JamPeers"; value: { genesis: HexString } }\n;', + description: "One remote-operation permission requested by the product (RFC 0002).\n\n`ChainSubmit`, `PreimageSubmit`, `StatementSubmit` and `JamPeers` are also\ntriggered implicitly by the corresponding business calls when not yet\ngranted (`JamPeerTransport::dial` for `JamPeers`).", variants: [ { name: "Remote", @@ -4369,6 +4716,11 @@ export const types = [ type: '{ tag: "StatementSubmit"; value?: undefined }', description: "Submitting statements on behalf of the user via `remote_statement_store_submit`.", }, + { + name: "JamPeers", + type: '{ tag: "JamPeers"; value: { genesis: HexString } }', + description: "Read-only peer access over JAMNP-S QUIC/WebTransport to the validators\nof one JAM chain, through the `JamPeerTransport` service.\n\nThe app names the endpoints it dials; the grant covers only peers of\n`genesis`. Every byte received is untrusted, and the grant carries no\naccount, signing or submission authority.", + }, ], }, { diff --git a/vendor/truapi/dist/generated/client.d.ts b/vendor/truapi/dist/generated/client.d.ts index 076f3a31..f461feba 100644 --- a/vendor/truapi/dist/generated/client.d.ts +++ b/vendor/truapi/dist/generated/client.d.ts @@ -8,7 +8,7 @@ export { ResultAsync, SubscriptionError }; export type { CallOptions, HostInitiatedSubscriptionHandler, ObservableLike, Observer, Result, Subscription, TrUApiTransport }; export declare const TRUAPI_VERSION: 2; export declare const TRUAPI_CODEC_VERSION: 3; -export declare const TRUAPI_WIRE_SCHEMA_HASH: "7c073d1a8c5db314"; +export declare const TRUAPI_WIRE_SCHEMA_HASH: "62e34089b454506c"; /** Account lookup, aliasing, and proof generation. */ export declare class AccountClient { #private; @@ -194,6 +194,40 @@ export declare class EntropyClient { /** Derive deterministic entropy. */ derive(request: T.HostDeriveEntropyRequest, options?: CallOptions): ResultAsync>; } +/** + * Host-terminated QUIC/WebTransport streams to JAM peers (JAMNP-S). + * + * The host owns TLS, certificate verification and length framing; the guest + * verifies every byte it consumes. Access is a runtime permission, not a + * manifest declaration: `dial` requires + * [`RemotePermission::JamPeers`](crate::v01::RemotePermission::JamPeers) for + * its `genesis`, checking the product's stored decision, prompting when it is + * undetermined and persisting the answer per product and genesis. The other + * methods act only on connections a granted `dial` opened. A grant is + * separate from account, signing and storage authority. + */ +export declare class JamPeerTransportClient { + #private; + constructor(transport: TrUApiTransport); + /** + * Dial one peer. The host builds the ALPN from `genesis` and requires the + * peer certificate to carry `ed25519` (QUIC) or to hash to the + * certificate derived from `p256` (WebTransport). + */ + dial(request: T.HostJamPeerTransportDialRequest, options?: CallOptions): ResultAsync>; + /** Open a bidirectional stream on a connection and send its kind byte. */ + open(request: T.HostJamPeerTransportOpenRequest, options?: CallOptions): ResultAsync>; + /** Queue one message; the host prepends the `u32` little-endian length. */ + send(request: T.HostJamPeerTransportSendRequest, options?: CallOptions): ResultAsync>; + /** Poll one complete message without blocking; the host strips the length. */ + recv(request: T.HostJamPeerTransportRecvRequest, options?: CallOptions): ResultAsync>; + /** Abort a stream in both directions. */ + reset(request: T.HostJamPeerTransportResetRequest, options?: CallOptions): ResultAsync>; + /** Close a connection and every stream on it. */ + close(request: T.HostJamPeerTransportCloseRequest, options?: CallOptions): ResultAsync>; + /** Drain connection, stream-finish and inbound-stream events. */ + events(options?: CallOptions): ResultAsync>; +} /** Local key/value storage scoped to the calling product. */ export declare class LocalStorageClient { #private; @@ -510,6 +544,7 @@ export interface TrUApiClient { readonly coinPayment: CoinPaymentClient; readonly contacts: ContactsClient; readonly entropy: EntropyClient; + readonly jamPeerTransport: JamPeerTransportClient; readonly localStorage: LocalStorageClient; readonly locale: LocaleClient; readonly notifications: NotificationsClient; diff --git a/vendor/truapi/dist/generated/client.js b/vendor/truapi/dist/generated/client.js index 30ee2465..ae942396 100644 --- a/vendor/truapi/dist/generated/client.js +++ b/vendor/truapi/dist/generated/client.js @@ -7,7 +7,7 @@ import * as W from './wire-table.js'; export { ResultAsync, SubscriptionError }; export const TRUAPI_VERSION = 2; export const TRUAPI_CODEC_VERSION = 3; -export const TRUAPI_WIRE_SCHEMA_HASH = "7c073d1a8c5db314"; +export const TRUAPI_WIRE_SCHEMA_HASH = "62e34089b454506c"; function toSubscriptionError(error) { if (error instanceof SubscriptionError) return error; @@ -717,6 +717,112 @@ export class EntropyClient { }); } } +/** + * Host-terminated QUIC/WebTransport streams to JAM peers (JAMNP-S). + * + * The host owns TLS, certificate verification and length framing; the guest + * verifies every byte it consumes. Access is a runtime permission, not a + * manifest declaration: `dial` requires + * [`RemotePermission::JamPeers`](crate::v01::RemotePermission::JamPeers) for + * its `genesis`, checking the product's stored decision, prompting when it is + * undetermined and persisting the answer per product and genesis. The other + * methods act only on connections a granted `dial` opened. A grant is + * separate from account, signing and storage authority. + */ +export class JamPeerTransportClient { + #transport; + constructor(transport) { + this.#transport = transport; + } + /** + * Dial one peer. The host builds the ALPN from `genesis` and requires the + * peer certificate to carry `ed25519` (QUIC) or to hash to the + * certificate derived from `p256` (WebTransport). + */ + dial(request, options) { + return this.#transport.request({ + ids: W.JAM_PEER_TRANSPORT_DIAL, + payload: T.VersionedHostJamPeerTransportDialRequest.enc({ tag: "V1", value: request }), + signal: options?.signal, + decodeResponse: (payload) => { + const result = S.Result(T.VersionedHostJamPeerTransportDialResponse, S.CallError(T.VersionedHostJamPeerTransportDialError)).dec(payload); + return result.success ? { success: true, value: result.value.value } : result; + }, + }); + } + /** Open a bidirectional stream on a connection and send its kind byte. */ + open(request, options) { + return this.#transport.request({ + ids: W.JAM_PEER_TRANSPORT_OPEN, + payload: T.VersionedHostJamPeerTransportOpenRequest.enc({ tag: "V1", value: request }), + signal: options?.signal, + decodeResponse: (payload) => { + const result = S.Result(T.VersionedHostJamPeerTransportOpenResponse, S.CallError(T.VersionedHostJamPeerTransportOpenError)).dec(payload); + return result.success ? { success: true, value: result.value.value } : result; + }, + }); + } + /** Queue one message; the host prepends the `u32` little-endian length. */ + send(request, options) { + return this.#transport.request({ + ids: W.JAM_PEER_TRANSPORT_SEND, + payload: T.VersionedHostJamPeerTransportSendRequest.enc({ tag: "V1", value: request }), + signal: options?.signal, + decodeResponse: (payload) => { + const result = S.Result(T.VersionedHostJamPeerTransportSendResponse, S.CallError(T.VersionedHostJamPeerTransportSendError)).dec(payload); + return result.success ? { success: true, value: result.value.value } : result; + }, + }); + } + /** Poll one complete message without blocking; the host strips the length. */ + recv(request, options) { + return this.#transport.request({ + ids: W.JAM_PEER_TRANSPORT_RECV, + payload: T.VersionedHostJamPeerTransportRecvRequest.enc({ tag: "V1", value: request }), + signal: options?.signal, + decodeResponse: (payload) => { + const result = S.Result(T.VersionedHostJamPeerTransportRecvResponse, S.CallError(T.VersionedHostJamPeerTransportRecvError)).dec(payload); + return result.success ? { success: true, value: result.value.value } : result; + }, + }); + } + /** Abort a stream in both directions. */ + reset(request, options) { + return this.#transport.request({ + ids: W.JAM_PEER_TRANSPORT_RESET, + payload: T.VersionedHostJamPeerTransportResetRequest.enc({ tag: "V1", value: request }), + signal: options?.signal, + decodeResponse: (payload) => { + const result = S.Result(T.VersionedHostJamPeerTransportResetResponse, S.CallError(T.VersionedHostJamPeerTransportResetError)).dec(payload); + return result.success ? { success: true, value: result.value.value } : result; + }, + }); + } + /** Close a connection and every stream on it. */ + close(request, options) { + return this.#transport.request({ + ids: W.JAM_PEER_TRANSPORT_CLOSE, + payload: T.VersionedHostJamPeerTransportCloseRequest.enc({ tag: "V1", value: request }), + signal: options?.signal, + decodeResponse: (payload) => { + const result = S.Result(T.VersionedHostJamPeerTransportCloseResponse, S.CallError(T.VersionedHostJamPeerTransportCloseError)).dec(payload); + return result.success ? { success: true, value: result.value.value } : result; + }, + }); + } + /** Drain connection, stream-finish and inbound-stream events. */ + events(options) { + return this.#transport.request({ + ids: W.JAM_PEER_TRANSPORT_EVENTS, + payload: T.VersionedHostJamPeerTransportEventsRequest.enc({ tag: "V1", value: undefined }), + signal: options?.signal, + decodeResponse: (payload) => { + const result = S.Result(T.VersionedHostJamPeerTransportEventsResponse, S.CallError(T.VersionedHostJamPeerTransportEventsError)).dec(payload); + return result.success ? { success: true, value: result.value.value } : result; + }, + }); + } +} /** Local key/value storage scoped to the calling product. */ export class LocalStorageClient { #transport; @@ -1445,6 +1551,7 @@ export function createClient(transport) { coinPayment: new CoinPaymentClient(transport), contacts: new ContactsClient(transport), entropy: new EntropyClient(transport), + jamPeerTransport: new JamPeerTransportClient(transport), localStorage: new LocalStorageClient(transport), locale: new LocaleClient(transport), notifications: new NotificationsClient(transport), diff --git a/vendor/truapi/dist/generated/internal-client.d.ts b/vendor/truapi/dist/generated/internal-client.d.ts index 8e05016b..bfbb91b1 100644 --- a/vendor/truapi/dist/generated/internal-client.d.ts +++ b/vendor/truapi/dist/generated/internal-client.d.ts @@ -7,7 +7,7 @@ export { ResultAsync, SubscriptionError }; export type { CallOptions, HostInitiatedSubscriptionHandler, ObservableLike, Observer, Result, Subscription, TrUApiTransport }; export declare const TRUAPI_VERSION: 2; export declare const TRUAPI_CODEC_VERSION: 3; -export declare const TRUAPI_WIRE_SCHEMA_HASH: "7c073d1a8c5db314"; +export declare const TRUAPI_WIRE_SCHEMA_HASH: "62e34089b454506c"; /** Permission request methods. */ declare class PermissionsClient { #private; diff --git a/vendor/truapi/dist/generated/internal-client.js b/vendor/truapi/dist/generated/internal-client.js index a4cb51f9..922dc128 100644 --- a/vendor/truapi/dist/generated/internal-client.js +++ b/vendor/truapi/dist/generated/internal-client.js @@ -7,7 +7,7 @@ import * as W from './wire-table.js'; export { ResultAsync, SubscriptionError }; export const TRUAPI_VERSION = 2; export const TRUAPI_CODEC_VERSION = 3; -export const TRUAPI_WIRE_SCHEMA_HASH = "7c073d1a8c5db314"; +export const TRUAPI_WIRE_SCHEMA_HASH = "62e34089b454506c"; /** Permission request methods. */ class PermissionsClient { #transport; diff --git a/vendor/truapi/dist/generated/types.d.ts b/vendor/truapi/dist/generated/types.d.ts index 917891f9..08c67826 100644 --- a/vendor/truapi/dist/generated/types.d.ts +++ b/vendor/truapi/dist/generated/types.d.ts @@ -1276,6 +1276,174 @@ export type VersionedHostInfoResponse = value: HostInfo; }; export declare const VersionedHostInfoResponse: S.Codec; +/** Versioned envelope for [`HostJamPeerTransportCloseError`]. */ +export type VersionedHostJamPeerTransportCloseError = +/** Version 1 payload. */ +{ + tag: "V1"; + value: HostJamPeerTransportCloseError; +}; +export declare const VersionedHostJamPeerTransportCloseError: S.Codec; +/** Versioned envelope for [`HostJamPeerTransportCloseRequest`]. */ +export type VersionedHostJamPeerTransportCloseRequest = +/** Version 1 payload. */ +{ + tag: "V1"; + value: HostJamPeerTransportCloseRequest; +}; +export declare const VersionedHostJamPeerTransportCloseRequest: S.Codec; +/** Versioned envelope for [`HostJamPeerTransportCloseResponse`]. */ +export type VersionedHostJamPeerTransportCloseResponse = +/** Version 1 (no payload). */ +{ + tag: "V1"; + value?: undefined; +}; +export declare const VersionedHostJamPeerTransportCloseResponse: S.Codec; +/** Versioned envelope for [`HostJamPeerTransportDialError`]. */ +export type VersionedHostJamPeerTransportDialError = +/** Version 1 payload. */ +{ + tag: "V1"; + value: HostJamPeerTransportDialError; +}; +export declare const VersionedHostJamPeerTransportDialError: S.Codec; +/** Versioned envelope for [`HostJamPeerTransportDialRequest`]. */ +export type VersionedHostJamPeerTransportDialRequest = +/** Version 1 payload. */ +{ + tag: "V1"; + value: HostJamPeerTransportDialRequest; +}; +export declare const VersionedHostJamPeerTransportDialRequest: S.Codec; +/** Versioned envelope for [`HostJamPeerTransportDialResponse`]. */ +export type VersionedHostJamPeerTransportDialResponse = +/** Version 1 payload. */ +{ + tag: "V1"; + value: HostJamPeerTransportDialResponse; +}; +export declare const VersionedHostJamPeerTransportDialResponse: S.Codec; +/** Versioned envelope for [`HostJamPeerTransportEventsError`]. */ +export type VersionedHostJamPeerTransportEventsError = +/** Version 1 payload. */ +{ + tag: "V1"; + value: HostJamPeerTransportEventsError; +}; +export declare const VersionedHostJamPeerTransportEventsError: S.Codec; +/** Versioned envelope for [`HostJamPeerTransportEventsRequest`]. */ +export type VersionedHostJamPeerTransportEventsRequest = +/** Version 1 (no payload). */ +{ + tag: "V1"; + value?: undefined; +}; +export declare const VersionedHostJamPeerTransportEventsRequest: S.Codec; +/** Versioned envelope for [`HostJamPeerTransportEventsResponse`]. */ +export type VersionedHostJamPeerTransportEventsResponse = +/** Version 1 payload. */ +{ + tag: "V1"; + value: HostJamPeerTransportEventsResponse; +}; +export declare const VersionedHostJamPeerTransportEventsResponse: S.Codec; +/** Versioned envelope for [`HostJamPeerTransportOpenError`]. */ +export type VersionedHostJamPeerTransportOpenError = +/** Version 1 payload. */ +{ + tag: "V1"; + value: HostJamPeerTransportOpenError; +}; +export declare const VersionedHostJamPeerTransportOpenError: S.Codec; +/** Versioned envelope for [`HostJamPeerTransportOpenRequest`]. */ +export type VersionedHostJamPeerTransportOpenRequest = +/** Version 1 payload. */ +{ + tag: "V1"; + value: HostJamPeerTransportOpenRequest; +}; +export declare const VersionedHostJamPeerTransportOpenRequest: S.Codec; +/** Versioned envelope for [`HostJamPeerTransportOpenResponse`]. */ +export type VersionedHostJamPeerTransportOpenResponse = +/** Version 1 payload. */ +{ + tag: "V1"; + value: HostJamPeerTransportOpenResponse; +}; +export declare const VersionedHostJamPeerTransportOpenResponse: S.Codec; +/** Versioned envelope for [`HostJamPeerTransportRecvError`]. */ +export type VersionedHostJamPeerTransportRecvError = +/** Version 1 payload. */ +{ + tag: "V1"; + value: HostJamPeerTransportRecvError; +}; +export declare const VersionedHostJamPeerTransportRecvError: S.Codec; +/** Versioned envelope for [`HostJamPeerTransportRecvRequest`]. */ +export type VersionedHostJamPeerTransportRecvRequest = +/** Version 1 payload. */ +{ + tag: "V1"; + value: HostJamPeerTransportRecvRequest; +}; +export declare const VersionedHostJamPeerTransportRecvRequest: S.Codec; +/** Versioned envelope for [`HostJamPeerTransportRecvResponse`]. */ +export type VersionedHostJamPeerTransportRecvResponse = +/** Version 1 payload. */ +{ + tag: "V1"; + value: HostJamPeerTransportRecvResponse; +}; +export declare const VersionedHostJamPeerTransportRecvResponse: S.Codec; +/** Versioned envelope for [`HostJamPeerTransportResetError`]. */ +export type VersionedHostJamPeerTransportResetError = +/** Version 1 payload. */ +{ + tag: "V1"; + value: HostJamPeerTransportResetError; +}; +export declare const VersionedHostJamPeerTransportResetError: S.Codec; +/** Versioned envelope for [`HostJamPeerTransportResetRequest`]. */ +export type VersionedHostJamPeerTransportResetRequest = +/** Version 1 payload. */ +{ + tag: "V1"; + value: HostJamPeerTransportResetRequest; +}; +export declare const VersionedHostJamPeerTransportResetRequest: S.Codec; +/** Versioned envelope for [`HostJamPeerTransportResetResponse`]. */ +export type VersionedHostJamPeerTransportResetResponse = +/** Version 1 (no payload). */ +{ + tag: "V1"; + value?: undefined; +}; +export declare const VersionedHostJamPeerTransportResetResponse: S.Codec; +/** Versioned envelope for [`HostJamPeerTransportSendError`]. */ +export type VersionedHostJamPeerTransportSendError = +/** Version 1 payload. */ +{ + tag: "V1"; + value: HostJamPeerTransportSendError; +}; +export declare const VersionedHostJamPeerTransportSendError: S.Codec; +/** Versioned envelope for [`HostJamPeerTransportSendRequest`]. */ +export type VersionedHostJamPeerTransportSendRequest = +/** Version 1 payload. */ +{ + tag: "V1"; + value: HostJamPeerTransportSendRequest; +}; +export declare const VersionedHostJamPeerTransportSendRequest: S.Codec; +/** Versioned envelope for [`HostJamPeerTransportSendResponse`]. */ +export type VersionedHostJamPeerTransportSendResponse = +/** Version 1 (no payload). */ +{ + tag: "V1"; + value?: undefined; +}; +export declare const VersionedHostJamPeerTransportSendResponse: S.Codec; /** Versioned envelope for [`HostLocalStorageChangeItem`]. */ export type VersionedHostLocalStorageChangeItem = /** Version 1 payload. */ @@ -1973,6 +2141,32 @@ export type ImageSource = value: string; }; export declare const ImageSource: S.Codec; +/** Asynchronous transport notification. */ +export type JamPeerTransportEvent = +/** The connection was closed by the peer or the host. */ +{ + tag: "ConnClosed"; + value: { + conn: number; + }; +} +/** The peer finished its send side of a stream. */ + | { + tag: "StreamFin"; + value: { + stream: number; + }; +} +/** The peer opened a stream to us on a dialed connection. */ + | { + tag: "Accepted"; + value: { + conn: number; + stream: number; + kind: number; + }; +}; +export declare const JamPeerTransportEvent: S.Codec; /** * A user-imported (legacy) account: public key plus an optional user-chosen * display name. @@ -2599,8 +2793,9 @@ export declare const VersionedRemoteChainTransactionStopResponse: S.Codec; /** Versioned envelope for [`RemotePermissionError`]. */ @@ -3905,6 +4114,113 @@ export interface HostHandshakeRequest { codecVersion: number; } export declare const HostHandshakeRequest: S.Codec; +/** Failure to close a connection. */ +export type HostJamPeerTransportCloseError = "Closed"; +export declare const HostJamPeerTransportCloseError: S.Codec; +/** Close a connection and every stream on it. */ +export interface HostJamPeerTransportCloseRequest { + /** Connection to close. */ + conn: number; +} +export declare const HostJamPeerTransportCloseRequest: S.Codec; +/** Failure to dial a JAM peer. */ +export type HostJamPeerTransportDialError = "NotGranted" | "Refused" | "Limit" | "Unreachable"; +export declare const HostJamPeerTransportDialError: S.Codec; +/** Dial one JAM peer over JAMNP-S (QUIC) or WebTransport. */ +export interface HostJamPeerTransportDialRequest { + /** + * Genesis header hash; the host derives the ALPN from it and requires a + * `RemotePermission::JamPeers` grant for it. + */ + genesis: HexString; + /** Peer IP address, IPv6 or v4-mapped IPv6. */ + ip: HexString; + /** Peer UDP port. */ + port: number; + /** Ed25519 key the peer's TLS certificate must carry. */ + ed25519: HexString; + /** Compressed P-256 peer key for WebTransport certificate hashes. */ + p256?: HexString; +} +export declare const HostJamPeerTransportDialRequest: S.Codec; +/** An open connection handle. */ +export interface HostJamPeerTransportDialResponse { + /** Execution-local connection id. */ + conn: number; +} +export declare const HostJamPeerTransportDialResponse: S.Codec; +/** Failure to drain events. */ +export type HostJamPeerTransportEventsError = "NotGranted"; +export declare const HostJamPeerTransportEventsError: S.Codec; +/** Events in arrival order. */ +export interface HostJamPeerTransportEventsResponse { + /** Pending events; empty when nothing happened. */ + events: Array; +} +export declare const HostJamPeerTransportEventsResponse: S.Codec; +/** Failure to open a stream. */ +export type HostJamPeerTransportOpenError = "NotGranted" | "Closed" | "Limit"; +export declare const HostJamPeerTransportOpenError: S.Codec; +/** Open a bidirectional stream and send its kind byte. */ +export interface HostJamPeerTransportOpenRequest { + /** Connection returned by `dial`. */ + conn: number; + /** JAMNP-S stream kind (UP 0, CE 128, ...). */ + kind: number; +} +export declare const HostJamPeerTransportOpenRequest: S.Codec; +/** An open stream handle. */ +export interface HostJamPeerTransportOpenResponse { + /** Execution-local stream id. */ + stream: number; +} +export declare const HostJamPeerTransportOpenResponse: S.Codec; +/** Failure to receive from a stream. */ +export type HostJamPeerTransportRecvError = "Closed"; +export declare const HostJamPeerTransportRecvError: S.Codec; +/** Poll one complete framed message without blocking. */ +export interface HostJamPeerTransportRecvRequest { + /** Stream to read from. */ + stream: number; + /** Largest message the caller accepts. */ + max: number; +} +export declare const HostJamPeerTransportRecvRequest: S.Codec; +/** One unframed message, or none available yet. */ +export interface HostJamPeerTransportRecvResponse { + /** + * Complete message bytes without length prefix, or `None` when nothing + * has arrived yet. + */ + message?: HexString; + /** The peer finished its send side; no further messages will arrive. */ + fin: boolean; + /** The peer reset the stream; buffered data may be incomplete. */ + reset: boolean; +} +export declare const HostJamPeerTransportRecvResponse: S.Codec; +/** Failure to reset a stream. */ +export type HostJamPeerTransportResetError = "Closed"; +export declare const HostJamPeerTransportResetError: S.Codec; +/** Abort both directions of a stream. */ +export interface HostJamPeerTransportResetRequest { + /** Stream to reset. */ + stream: number; +} +export declare const HostJamPeerTransportResetRequest: S.Codec; +/** Failure to send a message. */ +export type HostJamPeerTransportSendError = "Closed" | "TooLarge" | "Limit"; +export declare const HostJamPeerTransportSendError: S.Codec; +/** Send one framed message; the host adds the `u32` little-endian length. */ +export interface HostJamPeerTransportSendRequest { + /** Stream returned by `open` or reported by an `Accepted` event. */ + stream: number; + /** Message bytes without length prefix. */ + message: HexString; + /** Finish the send side after this message. */ + fin: boolean; +} +export declare const HostJamPeerTransportSendRequest: S.Codec; /** A change to a subscribed storage key, pushed to the subscriber. */ export interface HostLocalStorageChangeItem { /** Value after the change. `Some` on write, `None` after clear. */ diff --git a/vendor/truapi/dist/generated/types.js b/vendor/truapi/dist/generated/types.js index 415687b4..d2735d37 100644 --- a/vendor/truapi/dist/generated/types.js +++ b/vendor/truapi/dist/generated/types.js @@ -145,6 +145,27 @@ export const HostInfo = S.lazy(() => S.Struct({ platform: HostPlatform, name: S. export const VersionedHostInfoError = S.lazy(() => S.indexedTaggedUnion({ V1: [0, GenericError] })); export const VersionedHostInfoRequest = S.lazy(() => S.indexedTaggedUnion({ V1: [0, S._void] })); export const VersionedHostInfoResponse = S.lazy(() => S.indexedTaggedUnion({ V1: [0, HostInfo] })); +export const VersionedHostJamPeerTransportCloseError = S.lazy(() => S.indexedTaggedUnion({ V1: [0, HostJamPeerTransportCloseError] })); +export const VersionedHostJamPeerTransportCloseRequest = S.lazy(() => S.indexedTaggedUnion({ V1: [0, HostJamPeerTransportCloseRequest] })); +export const VersionedHostJamPeerTransportCloseResponse = S.lazy(() => S.indexedTaggedUnion({ V1: [0, S._void] })); +export const VersionedHostJamPeerTransportDialError = S.lazy(() => S.indexedTaggedUnion({ V1: [0, HostJamPeerTransportDialError] })); +export const VersionedHostJamPeerTransportDialRequest = S.lazy(() => S.indexedTaggedUnion({ V1: [0, HostJamPeerTransportDialRequest] })); +export const VersionedHostJamPeerTransportDialResponse = S.lazy(() => S.indexedTaggedUnion({ V1: [0, HostJamPeerTransportDialResponse] })); +export const VersionedHostJamPeerTransportEventsError = S.lazy(() => S.indexedTaggedUnion({ V1: [0, HostJamPeerTransportEventsError] })); +export const VersionedHostJamPeerTransportEventsRequest = S.lazy(() => S.indexedTaggedUnion({ V1: [0, S._void] })); +export const VersionedHostJamPeerTransportEventsResponse = S.lazy(() => S.indexedTaggedUnion({ V1: [0, HostJamPeerTransportEventsResponse] })); +export const VersionedHostJamPeerTransportOpenError = S.lazy(() => S.indexedTaggedUnion({ V1: [0, HostJamPeerTransportOpenError] })); +export const VersionedHostJamPeerTransportOpenRequest = S.lazy(() => S.indexedTaggedUnion({ V1: [0, HostJamPeerTransportOpenRequest] })); +export const VersionedHostJamPeerTransportOpenResponse = S.lazy(() => S.indexedTaggedUnion({ V1: [0, HostJamPeerTransportOpenResponse] })); +export const VersionedHostJamPeerTransportRecvError = S.lazy(() => S.indexedTaggedUnion({ V1: [0, HostJamPeerTransportRecvError] })); +export const VersionedHostJamPeerTransportRecvRequest = S.lazy(() => S.indexedTaggedUnion({ V1: [0, HostJamPeerTransportRecvRequest] })); +export const VersionedHostJamPeerTransportRecvResponse = S.lazy(() => S.indexedTaggedUnion({ V1: [0, HostJamPeerTransportRecvResponse] })); +export const VersionedHostJamPeerTransportResetError = S.lazy(() => S.indexedTaggedUnion({ V1: [0, HostJamPeerTransportResetError] })); +export const VersionedHostJamPeerTransportResetRequest = S.lazy(() => S.indexedTaggedUnion({ V1: [0, HostJamPeerTransportResetRequest] })); +export const VersionedHostJamPeerTransportResetResponse = S.lazy(() => S.indexedTaggedUnion({ V1: [0, S._void] })); +export const VersionedHostJamPeerTransportSendError = S.lazy(() => S.indexedTaggedUnion({ V1: [0, HostJamPeerTransportSendError] })); +export const VersionedHostJamPeerTransportSendRequest = S.lazy(() => S.indexedTaggedUnion({ V1: [0, HostJamPeerTransportSendRequest] })); +export const VersionedHostJamPeerTransportSendResponse = S.lazy(() => S.indexedTaggedUnion({ V1: [0, S._void] })); export const VersionedHostLocalStorageChangeItem = S.lazy(() => S.indexedTaggedUnion({ V1: [0, HostLocalStorageChangeItem] })); export const VersionedHostLocalStorageClearError = S.lazy(() => S.indexedTaggedUnion({ V1: [0, V01HostLocalStorageReadError] })); export const VersionedHostLocalStorageClearRequest = S.lazy(() => S.indexedTaggedUnion({ V1: [0, HostLocalStorageClearRequest] })); @@ -227,6 +248,7 @@ export const HostWorkerOperationError = S.lazy(() => S.TaggedUnion({ TooManyOpen export const ImageFit = S.lazy(() => S.Status("None", "Fill", "Cover", "Contain", "ScaleDown")); export const ImageProps = S.lazy(() => S.Struct({ source: ImageSource, fit: S.Option(ImageFit) })); export const ImageSource = S.lazy(() => S.TaggedUnion({ Bulletin: S.str, Archive: S.str })); +export const JamPeerTransportEvent = S.lazy(() => S.TaggedUnion({ ConnClosed: S.Struct({ conn: S.u32 }), StreamFin: S.Struct({ stream: S.u32 }), Accepted: S.Struct({ conn: S.u32, stream: S.u32, kind: S.u8 }) })); export const LegacyAccount = S.lazy(() => S.Struct({ publicKey: S.Hex(), name: S.Option(S.str) })); export const LegacyAccountTxPayload = S.lazy(() => S.Struct({ signer: S.Hex(32), genesisHash: S.Hex(32), callData: S.Hex(), extensions: S.Vector(TxPayloadExtension), txExtVersion: S.u8 })); export const Modifier = S.lazy(() => S.TaggedUnion({ Margin: Dimensions, Padding: Dimensions, Background: Background, Border: BorderStyle, Height: Size, Width: Size, MinWidth: Size, MinHeight: Size, FillWidth: S.bool, FillHeight: S.bool, Opacity: S.u8, BlendingMode: BlendingMode })); @@ -285,7 +307,7 @@ export const VersionedRemoteChainTransactionBroadcastResponse = S.lazy(() => S.i export const VersionedRemoteChainTransactionStopError = S.lazy(() => S.indexedTaggedUnion({ V1: [0, GenericError] })); export const VersionedRemoteChainTransactionStopRequest = S.lazy(() => S.indexedTaggedUnion({ V1: [0, RemoteChainTransactionStopRequest] })); export const VersionedRemoteChainTransactionStopResponse = S.lazy(() => S.indexedTaggedUnion({ V1: [0, S._void] })); -export const RemotePermission = S.lazy(() => S.TaggedUnion({ Remote: S.Struct({ domains: S.Vector(S.str) }), WebRtc: S._void, ChainSubmit: S._void, PreimageSubmit: S._void, StatementSubmit: S._void })); +export const RemotePermission = S.lazy(() => S.TaggedUnion({ Remote: S.Struct({ domains: S.Vector(S.str) }), WebRtc: S._void, ChainSubmit: S._void, PreimageSubmit: S._void, StatementSubmit: S._void, JamPeers: S.Struct({ genesis: S.Hex(32) }) })); export const VersionedRemotePermissionError = S.lazy(() => S.indexedTaggedUnion({ V1: [0, GenericError] })); export const VersionedRemotePermissionRequest = S.lazy(() => S.indexedTaggedUnion({ V1: [0, RemotePermissionRequest] })); export const VersionedRemotePermissionResponse = S.lazy(() => S.indexedTaggedUnion({ V1: [0, RemotePermissionResponse] })); @@ -392,6 +414,23 @@ export const HostGetUserIdError = S.lazy(() => S.TaggedUnion({ PermissionDenied: export const HostGetUserIdResponse = S.lazy(() => S.Struct({ primaryUsername: S.str })); export const HostHandshakeError = S.lazy(() => S.TaggedUnion({ Timeout: S._void, UnsupportedProtocolVersion: S._void, Unknown: GenericError })); export const HostHandshakeRequest = S.lazy(() => S.Struct({ codecVersion: S.u8 })); +export const HostJamPeerTransportCloseError = S.lazy(() => S.Status("Closed")); +export const HostJamPeerTransportCloseRequest = S.lazy(() => S.Struct({ conn: S.u32 })); +export const HostJamPeerTransportDialError = S.lazy(() => S.Status("NotGranted", "Refused", "Limit", "Unreachable")); +export const HostJamPeerTransportDialRequest = S.lazy(() => S.Struct({ genesis: S.Hex(32), ip: S.Hex(16), port: S.u16, ed25519: S.Hex(32), p256: S.Option(S.Hex(33)) })); +export const HostJamPeerTransportDialResponse = S.lazy(() => S.Struct({ conn: S.u32 })); +export const HostJamPeerTransportEventsError = S.lazy(() => S.Status("NotGranted")); +export const HostJamPeerTransportEventsResponse = S.lazy(() => S.Struct({ events: S.Vector(JamPeerTransportEvent) })); +export const HostJamPeerTransportOpenError = S.lazy(() => S.Status("NotGranted", "Closed", "Limit")); +export const HostJamPeerTransportOpenRequest = S.lazy(() => S.Struct({ conn: S.u32, kind: S.u8 })); +export const HostJamPeerTransportOpenResponse = S.lazy(() => S.Struct({ stream: S.u32 })); +export const HostJamPeerTransportRecvError = S.lazy(() => S.Status("Closed")); +export const HostJamPeerTransportRecvRequest = S.lazy(() => S.Struct({ stream: S.u32, max: S.u32 })); +export const HostJamPeerTransportRecvResponse = S.lazy(() => S.Struct({ message: S.Option(S.Hex()), fin: S.bool, reset: S.bool })); +export const HostJamPeerTransportResetError = S.lazy(() => S.Status("Closed")); +export const HostJamPeerTransportResetRequest = S.lazy(() => S.Struct({ stream: S.u32 })); +export const HostJamPeerTransportSendError = S.lazy(() => S.Status("Closed", "TooLarge", "Limit")); +export const HostJamPeerTransportSendRequest = S.lazy(() => S.Struct({ stream: S.u32, message: S.Hex(), fin: S.bool })); export const HostLocalStorageChangeItem = S.lazy(() => S.Struct({ value: S.Option(S.Hex()) })); export const HostLocalStorageClearRequest = S.lazy(() => S.Struct({ key: S.str })); export const V01HostLocalStorageReadError = S.lazy(() => S.TaggedUnion({ Full: S._void, Unknown: S.Struct({ reason: S.str }) })); diff --git a/vendor/truapi/dist/generated/wire-decode.js b/vendor/truapi/dist/generated/wire-decode.js index 432b2d39..c75e8b3f 100644 --- a/vendor/truapi/dist/generated/wire-decode.js +++ b/vendor/truapi/dist/generated/wire-decode.js @@ -380,4 +380,32 @@ export const WIRE_DECODE_TABLE = { 0: (payload) => T.VersionedHostContactsPickRequest.dec(payload), 1: (payload) => S.Result(T.VersionedHostContactsPickResponse, S.CallError(T.VersionedHostContactsPickError)).dec(payload), }, + [W.JAM_PEER_TRANSPORT_DIAL.trait * 256 + W.JAM_PEER_TRANSPORT_DIAL.method]: { + 0: (payload) => T.VersionedHostJamPeerTransportDialRequest.dec(payload), + 1: (payload) => S.Result(T.VersionedHostJamPeerTransportDialResponse, S.CallError(T.VersionedHostJamPeerTransportDialError)).dec(payload), + }, + [W.JAM_PEER_TRANSPORT_OPEN.trait * 256 + W.JAM_PEER_TRANSPORT_OPEN.method]: { + 0: (payload) => T.VersionedHostJamPeerTransportOpenRequest.dec(payload), + 1: (payload) => S.Result(T.VersionedHostJamPeerTransportOpenResponse, S.CallError(T.VersionedHostJamPeerTransportOpenError)).dec(payload), + }, + [W.JAM_PEER_TRANSPORT_SEND.trait * 256 + W.JAM_PEER_TRANSPORT_SEND.method]: { + 0: (payload) => T.VersionedHostJamPeerTransportSendRequest.dec(payload), + 1: (payload) => S.Result(T.VersionedHostJamPeerTransportSendResponse, S.CallError(T.VersionedHostJamPeerTransportSendError)).dec(payload), + }, + [W.JAM_PEER_TRANSPORT_RECV.trait * 256 + W.JAM_PEER_TRANSPORT_RECV.method]: { + 0: (payload) => T.VersionedHostJamPeerTransportRecvRequest.dec(payload), + 1: (payload) => S.Result(T.VersionedHostJamPeerTransportRecvResponse, S.CallError(T.VersionedHostJamPeerTransportRecvError)).dec(payload), + }, + [W.JAM_PEER_TRANSPORT_RESET.trait * 256 + W.JAM_PEER_TRANSPORT_RESET.method]: { + 0: (payload) => T.VersionedHostJamPeerTransportResetRequest.dec(payload), + 1: (payload) => S.Result(T.VersionedHostJamPeerTransportResetResponse, S.CallError(T.VersionedHostJamPeerTransportResetError)).dec(payload), + }, + [W.JAM_PEER_TRANSPORT_CLOSE.trait * 256 + W.JAM_PEER_TRANSPORT_CLOSE.method]: { + 0: (payload) => T.VersionedHostJamPeerTransportCloseRequest.dec(payload), + 1: (payload) => S.Result(T.VersionedHostJamPeerTransportCloseResponse, S.CallError(T.VersionedHostJamPeerTransportCloseError)).dec(payload), + }, + [W.JAM_PEER_TRANSPORT_EVENTS.trait * 256 + W.JAM_PEER_TRANSPORT_EVENTS.method]: { + 0: (payload) => T.VersionedHostJamPeerTransportEventsRequest.dec(payload), + 1: (payload) => S.Result(T.VersionedHostJamPeerTransportEventsResponse, S.CallError(T.VersionedHostJamPeerTransportEventsError)).dec(payload), + }, }; diff --git a/vendor/truapi/dist/generated/wire-table.d.ts b/vendor/truapi/dist/generated/wire-table.d.ts index a01ea29c..194f5af3 100644 --- a/vendor/truapi/dist/generated/wire-table.d.ts +++ b/vendor/truapi/dist/generated/wire-table.d.ts @@ -418,3 +418,38 @@ export declare const CONTACTS_PICK: { readonly method: 0; readonly kind: "request"; }; +export declare const JAM_PEER_TRANSPORT_DIAL: { + readonly trait: 111; + readonly method: 0; + readonly kind: "request"; +}; +export declare const JAM_PEER_TRANSPORT_OPEN: { + readonly trait: 111; + readonly method: 1; + readonly kind: "request"; +}; +export declare const JAM_PEER_TRANSPORT_SEND: { + readonly trait: 111; + readonly method: 2; + readonly kind: "request"; +}; +export declare const JAM_PEER_TRANSPORT_RECV: { + readonly trait: 111; + readonly method: 3; + readonly kind: "request"; +}; +export declare const JAM_PEER_TRANSPORT_RESET: { + readonly trait: 111; + readonly method: 4; + readonly kind: "request"; +}; +export declare const JAM_PEER_TRANSPORT_CLOSE: { + readonly trait: 111; + readonly method: 5; + readonly kind: "request"; +}; +export declare const JAM_PEER_TRANSPORT_EVENTS: { + readonly trait: 111; + readonly method: 6; + readonly kind: "request"; +}; diff --git a/vendor/truapi/dist/generated/wire-table.js b/vendor/truapi/dist/generated/wire-table.js index dd003d38..a20e37db 100644 --- a/vendor/truapi/dist/generated/wire-table.js +++ b/vendor/truapi/dist/generated/wire-table.js @@ -429,3 +429,38 @@ export const CONTACTS_PICK = { method: 0, kind: "request", }; +export const JAM_PEER_TRANSPORT_DIAL = { + trait: 111, + method: 0, + kind: "request", +}; +export const JAM_PEER_TRANSPORT_OPEN = { + trait: 111, + method: 1, + kind: "request", +}; +export const JAM_PEER_TRANSPORT_SEND = { + trait: 111, + method: 2, + kind: "request", +}; +export const JAM_PEER_TRANSPORT_RECV = { + trait: 111, + method: 3, + kind: "request", +}; +export const JAM_PEER_TRANSPORT_RESET = { + trait: 111, + method: 4, + kind: "request", +}; +export const JAM_PEER_TRANSPORT_CLOSE = { + trait: 111, + method: 5, + kind: "request", +}; +export const JAM_PEER_TRANSPORT_EVENTS = { + trait: 111, + method: 6, + kind: "request", +}; diff --git a/vendor/truapi/dist/jam-peer-transport-cert.d.ts b/vendor/truapi/dist/jam-peer-transport-cert.d.ts new file mode 100644 index 00000000..c207bcc8 --- /dev/null +++ b/vendor/truapi/dist/jam-peer-transport-cert.d.ts @@ -0,0 +1,61 @@ +/** + * Deterministic WebTransport certificate hashes for a PolkaJAM peer. + * + * PolkaJAM (`crates/node/src/net/cert.rs`, `dd9af78`) serves an unsigned X.509 + * certificate for its P-256 peer key: issuer and subject `CN=jam`, one dNSName + * SAN equal to the peer-id text, Ed25519 signature algorithm with an all-zero + * 64-byte signature, and a validity window derived from a fixed 10-day period + * padded by one day on both sides. A client that knows the peer's compressed + * P-256 key can therefore compute the certificate hashes offline and pass them + * as `serverCertificateHashes`. These bytes mirror PolkaJAM's + * `crates/node/src/net/cert.rs` generated with rcgen 0.14.8. + * + * Stock PolkaJAM gives every certificate serial 0. NSS (Firefox) rejects a + * second certificate with an issuer and serial it has already seen + * (`SEC_ERROR_REUSED_ISSUER_AND_SERIAL`), so such a browser reaches only one + * validator. Nodes built with jam-explore's + * `polkajam-webtransport-serial.patch` use {@link webTransportSerial} instead; + * clients pin both variants so they reach stock and patched nodes alike. + */ +export declare const UNPADDED_VALIDITY_PERIOD_SECS: number; +export declare const VALIDITY_PERIOD_PADDING_SECS: number; +/** PolkaJAM peer-id text: prefix letter then 32 bytes, base-32 LSB-first. */ +export declare function peerIdText(prefix: string, bytes: Uint8Array): string; +/** Parse `e…`, `o…` or `v…` text into (prefix, 32 bytes). */ +export declare function parsePeerIdText(text: string): { + prefix: string; + bytes: Uint8Array; +}; +/** `o…`/`v…` text to a compressed SEC1 P-256 point (0x03 odd y / 0x02 even y). */ +export declare function p256IdToCompressed(text: string): Uint8Array; +/** Ed25519 `e…` text to the 32-byte public key. */ +export declare function ed25519IdToKey(text: string): Uint8Array; +/** Uncompressed SEC1 (0x04 ‖ x ‖ y) for a compressed P-256 point; p ≡ 3 mod 4. */ +export declare function decompressP256(compressed: Uint8Array): Uint8Array; +/** Fixed 10-day period index for a unix time; the server switches at boundaries. */ +export declare function validityPeriodAt(unixSecs: number): number; +/** `[notBefore, notAfter]` unix seconds of a period (padded by one day). */ +export declare function validityBounds(period: number): [number, number]; +/** + * Which serial a certificate carries: `distinct` ({@link webTransportSerial}, + * patched nodes) or `legacy` (0, stock PolkaJAM). + */ +export type CertificateSerial = "distinct" | "legacy"; +/** + * Serial of the patched PolkaJAM certificate for `compressed` during + * `period`: the first 8 bytes of SHA-256(`compressed` ‖ period as a + * big-endian u64), read big-endian with the top bit cleared, or 1 if that + * is 0. + */ +export declare function webTransportSerial(compressed: Uint8Array, period: number): bigint; +/** DER certificate PolkaJAM presents for `compressed` during `period`. */ +export declare function webTransportCertificateDer(compressed: Uint8Array, period: number, serial: CertificateSerial): Uint8Array; +/** SHA-256 of {@link webTransportCertificateDer}. */ +export declare function webTransportCertificateHash(compressed: Uint8Array, period: number, serial: CertificateSerial): Uint8Array; +/** + * Hashes to pass as `serverCertificateHashes` at `unixSecs`: both serial + * variants for the current period plus both neighbours, so a clock skew or a + * boundary crossing during the handshake still matches whichever certificate + * a stock or patched server picked. + */ +export declare function webTransportCertificateHashes(compressed: Uint8Array, unixSecs: number): Uint8Array[]; diff --git a/vendor/truapi/dist/jam-peer-transport-cert.js b/vendor/truapi/dist/jam-peer-transport-cert.js new file mode 100644 index 00000000..1bd454e3 --- /dev/null +++ b/vendor/truapi/dist/jam-peer-transport-cert.js @@ -0,0 +1,213 @@ +import { sha256 } from "@noble/hashes/sha2.js"; +/** + * Deterministic WebTransport certificate hashes for a PolkaJAM peer. + * + * PolkaJAM (`crates/node/src/net/cert.rs`, `dd9af78`) serves an unsigned X.509 + * certificate for its P-256 peer key: issuer and subject `CN=jam`, one dNSName + * SAN equal to the peer-id text, Ed25519 signature algorithm with an all-zero + * 64-byte signature, and a validity window derived from a fixed 10-day period + * padded by one day on both sides. A client that knows the peer's compressed + * P-256 key can therefore compute the certificate hashes offline and pass them + * as `serverCertificateHashes`. These bytes mirror PolkaJAM's + * `crates/node/src/net/cert.rs` generated with rcgen 0.14.8. + * + * Stock PolkaJAM gives every certificate serial 0. NSS (Firefox) rejects a + * second certificate with an issuer and serial it has already seen + * (`SEC_ERROR_REUSED_ISSUER_AND_SERIAL`), so such a browser reaches only one + * validator. Nodes built with jam-explore's + * `polkajam-webtransport-serial.patch` use {@link webTransportSerial} instead; + * clients pin both variants so they reach stock and patched nodes alike. + */ +export const UNPADDED_VALIDITY_PERIOD_SECS = 10 * 24 * 3600; +export const VALIDITY_PERIOD_PADDING_SECS = 24 * 3600; +const BITS_TO_CHAR = "abcdefghijklmnopqrstuvwxyz234567"; +const P = (1n << 256n) - (1n << 224n) + (1n << 192n) + (1n << 96n) - 1n; +const B = 0x5ac635d8aa3a93e7b3ebbd55769886bc651d06b0cc53b0f63bce3c3e27d2604bn; +const OID_ED25519 = [0x06, 0x03, 0x2b, 0x65, 0x70]; +const OID_EC_PUBLIC_KEY = [0x06, 0x07, 0x2a, 0x86, 0x48, 0xce, 0x3d, 0x02, 0x01]; +const OID_PRIME256V1 = [0x06, 0x08, 0x2a, 0x86, 0x48, 0xce, 0x3d, 0x03, 0x01, 0x07]; +const OID_SUBJECT_ALT_NAME = [0x06, 0x03, 0x55, 0x1d, 0x11]; +const ascii = new TextEncoder(); +/** PolkaJAM peer-id text: prefix letter then 32 bytes, base-32 LSB-first. */ +export function peerIdText(prefix, bytes) { + if (bytes.length !== 32) + throw new Error("peer id needs 32 bytes"); + let text = prefix; + for (let i = 0; i < 256; i += 5) { + const low = bytes[i >> 3]; + const high = bytes[(i >> 3) + 1] ?? 0; + text += BITS_TO_CHAR[((low | (high << 8)) >> (i % 8)) & 0x1f]; + } + return text; +} +/** Parse `e…`, `o…` or `v…` text into (prefix, 32 bytes). */ +export function parsePeerIdText(text) { + if (text.length !== 53) + throw new Error(`peer id text must be 53 characters, got ${text.length}`); + const bytes = new Uint8Array(32); + let acc = 0; + let n = 0; + let i = 0; + for (const char of text.slice(1)) { + const bits = BITS_TO_CHAR.indexOf(char); + if (bits < 0) + throw new Error(`invalid peer id character ${JSON.stringify(char)}`); + acc |= bits << n; + n += 5; + if (n >= 8) { + bytes[i++] = acc & 0xff; + acc >>= 8; + n -= 8; + } + } + if (acc !== 0) + throw new Error("peer id has non-zero trailing bits"); + return { prefix: text[0], bytes }; +} +/** `o…`/`v…` text to a compressed SEC1 P-256 point (0x03 odd y / 0x02 even y). */ +export function p256IdToCompressed(text) { + const { prefix, bytes } = parsePeerIdText(text); + if (prefix !== "o" && prefix !== "v") + throw new Error("P-256 peer ids begin with 'o' or 'v'"); + const out = new Uint8Array(33); + out[0] = prefix === "o" ? 3 : 2; + out.set(bytes, 1); + return out; +} +/** Ed25519 `e…` text to the 32-byte public key. */ +export function ed25519IdToKey(text) { + const { prefix, bytes } = parsePeerIdText(text); + if (prefix !== "e") + throw new Error("Ed25519 peer ids begin with 'e'"); + return bytes; +} +function bigintFromBytes(bytes) { + let v = 0n; + for (const b of bytes) + v = (v << 8n) | BigInt(b); + return v; +} +function bytesFromBigint(v, length) { + const out = new Uint8Array(length); + for (let i = length - 1; i >= 0; i--) { + out[i] = Number(v & 0xffn); + v >>= 8n; + } + return out; +} +function modPow(base, exp, mod) { + let result = 1n; + base %= mod; + while (exp > 0n) { + if (exp & 1n) + result = (result * base) % mod; + base = (base * base) % mod; + exp >>= 1n; + } + return result; +} +/** Uncompressed SEC1 (0x04 ‖ x ‖ y) for a compressed P-256 point; p ≡ 3 mod 4. */ +export function decompressP256(compressed) { + if (compressed.length !== 33 || (compressed[0] !== 2 && compressed[0] !== 3)) { + throw new Error("expected a 33-byte compressed P-256 point"); + } + const x = bigintFromBytes(compressed.subarray(1)); + if (x >= P) + throw new Error("P-256 x coordinate out of range"); + const rhs = (((x * x) % P) * x - 3n * x + B) % P; + const alpha = (rhs + P) % P; + let y = modPow(alpha, (P + 1n) >> 2n, P); + if ((y * y) % P !== alpha) + throw new Error("P-256 x coordinate is not on the curve"); + if ((y & 1n) !== BigInt(compressed[0] & 1)) + y = P - y; + const out = new Uint8Array(65); + out[0] = 4; + out.set(bytesFromBigint(x, 32), 1); + out.set(bytesFromBigint(y, 32), 33); + return out; +} +function der(tag, ...parts) { + const body = parts.flatMap((part) => Array.from(part)); + const len = body.length; + const header = len < 0x80 + ? [tag, len] + : len < 0x100 + ? [tag, 0x81, len] + : [tag, 0x82, len >> 8, len & 0xff]; + return header.concat(body); +} +/** Minimal DER encoding of a non-negative INTEGER. */ +function derUnsigned(v) { + const bytes = []; + for (; v > 0n; v >>= 8n) + bytes.unshift(Number(v & 0xffn)); + if (bytes.length === 0 || bytes[0] >= 0x80) + bytes.unshift(0); + return der(0x02, bytes); +} +function utcTime(unixSecs) { + const date = new Date(unixSecs * 1000); + const year = date.getUTCFullYear(); + if (year < 1950 || year >= 2050) { + throw new Error("validity outside the UTCTime range PolkaJAM certificates use"); + } + const two = (n) => String(n).padStart(2, "0"); + const text = `${two(year % 100)}${two(date.getUTCMonth() + 1)}${two(date.getUTCDate())}${two(date.getUTCHours())}${two(date.getUTCMinutes())}${two(date.getUTCSeconds())}Z`; + return der(0x17, ascii.encode(text)); +} +const JAM_DN = der(0x30, der(0x31, der(0x30, [0x06, 0x03, 0x55, 0x04, 0x03], der(0x0c, ascii.encode("jam"))))); +const ED25519_ALG = der(0x30, OID_ED25519); +/** Fixed 10-day period index for a unix time; the server switches at boundaries. */ +export function validityPeriodAt(unixSecs) { + return Math.floor(unixSecs / UNPADDED_VALIDITY_PERIOD_SECS); +} +/** `[notBefore, notAfter]` unix seconds of a period (padded by one day). */ +export function validityBounds(period) { + return [ + Math.max(period * UNPADDED_VALIDITY_PERIOD_SECS - VALIDITY_PERIOD_PADDING_SECS, 0), + (period + 1) * UNPADDED_VALIDITY_PERIOD_SECS + VALIDITY_PERIOD_PADDING_SECS, + ]; +} +/** + * Serial of the patched PolkaJAM certificate for `compressed` during + * `period`: the first 8 bytes of SHA-256(`compressed` ‖ period as a + * big-endian u64), read big-endian with the top bit cleared, or 1 if that + * is 0. + */ +export function webTransportSerial(compressed, period) { + const input = new Uint8Array(compressed.length + 8); + input.set(compressed); + input.set(bytesFromBigint(BigInt(period), 8), compressed.length); + const serial = bigintFromBytes(sha256(input).subarray(0, 8)) & ((1n << 63n) - 1n); + return serial === 0n ? 1n : serial; +} +/** DER certificate PolkaJAM presents for `compressed` during `period`. */ +export function webTransportCertificateDer(compressed, period, serial) { + const point = decompressP256(compressed); + const altName = peerIdText(compressed[0] === 3 ? "o" : "v", compressed.subarray(1)); + const [notBefore, notAfter] = validityBounds(period); + const spki = der(0x30, der(0x30, OID_EC_PUBLIC_KEY, OID_PRIME256V1), der(0x03, [0x00], point)); + const san = der(0x30, der(0x30, OID_SUBJECT_ALT_NAME, der(0x04, der(0x30, der(0x82, ascii.encode(altName)))))); + const tbs = der(0x30, der(0xa0, der(0x02, [0x02])), derUnsigned(serial === "distinct" ? webTransportSerial(compressed, period) : 0n), ED25519_ALG, JAM_DN, der(0x30, utcTime(notBefore), utcTime(notAfter)), JAM_DN, spki, der(0xa3, san)); + return Uint8Array.from(der(0x30, tbs, ED25519_ALG, der(0x03, [0x00], new Uint8Array(64)))); +} +/** SHA-256 of {@link webTransportCertificateDer}. */ +export function webTransportCertificateHash(compressed, period, serial) { + return sha256(webTransportCertificateDer(compressed, period, serial)); +} +/** + * Hashes to pass as `serverCertificateHashes` at `unixSecs`: both serial + * variants for the current period plus both neighbours, so a clock skew or a + * boundary crossing during the handshake still matches whichever certificate + * a stock or patched server picked. + */ +export function webTransportCertificateHashes(compressed, unixSecs) { + const period = validityPeriodAt(unixSecs); + return [period - 1, period, period + 1] + .filter((p) => p >= 0) + .flatMap((p) => [ + webTransportCertificateHash(compressed, p, "distinct"), + webTransportCertificateHash(compressed, p, "legacy"), + ]); +} diff --git a/vendor/truapi/dist/jam-peer-transport.d.ts b/vendor/truapi/dist/jam-peer-transport.d.ts new file mode 100644 index 00000000..5eb2f61e --- /dev/null +++ b/vendor/truapi/dist/jam-peer-transport.d.ts @@ -0,0 +1,64 @@ +/** Caps mirrored from `truapi::v01::jam_peer_transport`. */ +export declare const JAM_PEER_TRANSPORT_MAX_CONNECTIONS = 8; +export declare const JAM_PEER_TRANSPORT_MAX_STREAMS_PER_CONNECTION = 16; +export declare const JAM_PEER_TRANSPORT_MAX_MESSAGE_BYTES: number; +export declare const JAM_PEER_TRANSPORT_MAX_BUFFERED_BYTES_PER_CONNECTION: number; +/** Largest request frame: a `send` of a maximal message plus SCALE and wire overhead. */ +export declare const JAM_PEER_TRANSPORT_MAX_FRAME_BYTES: number; +/** + * Bound on one `dial`, from its arrival to its reply, the permission decision + * included. A guest that waits at least this long for a dial reply never + * misses one, and anything a dial would open after it is closed instead. + */ +export declare const JAM_PEER_TRANSPORT_DIAL_TIMEOUT_MS = 10000; +/** Minimal WebTransport surface the session needs; lets tests inject a fake. */ +export interface WebTransportLike { + readonly ready: Promise; + readonly closed: Promise; + readonly incomingBidirectionalStreams: ReadableStream; + createBidirectionalStream(): Promise; + close(): void; +} +export interface WebTransportBidirectionalStreamLike { + readonly readable: ReadableStream; + readonly writable: WritableStream; +} +export interface JamPeerTransportOptions { + /** + * Decide whether this execution may dial peers of `genesis`, a `0x`-prefixed + * lower-case 32-byte genesis header hash: the host's check of the + * `RemotePermission::JamPeers` runtime permission. The session asks at most + * once per genesis and concurrent dials share the pending answer; `false` or + * a rejection answers `NotGranted` for the rest of the session. + */ + authorize(genesis: string): Promise; + /** Host transport injection; defaults to the browser `WebTransport` constructor. */ + connect?: (url: string, certificateHashes: Uint8Array[]) => WebTransportLike; + /** Unix seconds used to select certificate validity periods; defaults to the wall clock. */ + now?: () => number; + /** Dial deadline in milliseconds; defaults to {@link JAM_PEER_TRANSPORT_DIAL_TIMEOUT_MS}. */ + dialTimeoutMs?: number; +} +/** Execution-local peer endpoint. It provides no account or signing authority. */ +export interface JamPeerTransportSession { + /** Handle one request frame; CANCEL frames return zero bytes. */ + handleFrame(frame: Uint8Array): Promise; + /** Close every connection on stop or replacement and refuse further requests. */ + close(): void; +} +/** Trait id of a request frame, or `undefined` when it does not decode. */ +export declare function frameTraitId(frame: Uint8Array): number | undefined; +/** `https://` authority for a 16-byte IPv6 or v4-mapped address. */ +export declare function peerUrl(ip: Uint8Array, port: number): string; +/** + * Create the browser JamPeerTransport endpoint for one execution. Every `dial` + * is authorized for its genesis through `options.authorize` before anything + * connects; the other methods act only on connections an authorized dial + * opened. A dial answers within its deadline, prompt included: one still + * waiting then answers `Unreachable`, a CANCEL naming it answers `Cancelled`, + * and in both cases whatever it opened is closed without holding a slot. The + * permission decision is remembered either way, so a retry does not ask + * again. The host must fence late replies against execution stop or + * replacement. + */ +export declare function createJamPeerTransportSession(options: JamPeerTransportOptions): JamPeerTransportSession; diff --git a/vendor/truapi/dist/jam-peer-transport.js b/vendor/truapi/dist/jam-peer-transport.js new file mode 100644 index 00000000..d45abf30 --- /dev/null +++ b/vendor/truapi/dist/jam-peer-transport.js @@ -0,0 +1,501 @@ +import * as S from "./scale.js"; +import * as T from "./generated/types.js"; +import { TRUAPI_CODEC_VERSION } from "./generated/client.js"; +import { JAM_PEER_TRANSPORT_CLOSE, JAM_PEER_TRANSPORT_DIAL, JAM_PEER_TRANSPORT_EVENTS, JAM_PEER_TRANSPORT_OPEN, JAM_PEER_TRANSPORT_RECV, JAM_PEER_TRANSPORT_RESET, JAM_PEER_TRANSPORT_SEND, SYSTEM_HANDSHAKE, } from "./generated/wire-table.js"; +import { decodeWireMessage, encodeWireMessage, MESSAGE_TYPE_CANCEL, MESSAGE_TYPE_REQUEST, MESSAGE_TYPE_RESPONSE, } from "./transport.js"; +import { webTransportCertificateHashes } from "./jam-peer-transport-cert.js"; +/** Caps mirrored from `truapi::v01::jam_peer_transport`. */ +export const JAM_PEER_TRANSPORT_MAX_CONNECTIONS = 8; +export const JAM_PEER_TRANSPORT_MAX_STREAMS_PER_CONNECTION = 16; +export const JAM_PEER_TRANSPORT_MAX_MESSAGE_BYTES = 1 << 20; +export const JAM_PEER_TRANSPORT_MAX_BUFFERED_BYTES_PER_CONNECTION = 4 << 20; +/** Largest request frame: a `send` of a maximal message plus SCALE and wire overhead. */ +export const JAM_PEER_TRANSPORT_MAX_FRAME_BYTES = JAM_PEER_TRANSPORT_MAX_MESSAGE_BYTES + 4096; +const MAX_PENDING_EVENTS = 1024; +/** + * Bound on one `dial`, from its arrival to its reply, the permission decision + * included. A guest that waits at least this long for a dial reply never + * misses one, and anything a dial would open after it is closed instead. + */ +export const JAM_PEER_TRANSPORT_DIAL_TIMEOUT_MS = 10_000; +const textEncoder = new TextEncoder(); +const handshakeResult = S.Result(T.VersionedHostHandshakeResponse, S.CallError(T.VersionedHostHandshakeError)); +const frameworkResult = S.Result(S._void, S.CallError(S._void)); +const dialResult = S.Result(T.VersionedHostJamPeerTransportDialResponse, S.CallError(T.VersionedHostJamPeerTransportDialError)); +const openResult = S.Result(T.VersionedHostJamPeerTransportOpenResponse, S.CallError(T.VersionedHostJamPeerTransportOpenError)); +const sendResult = S.Result(T.VersionedHostJamPeerTransportSendResponse, S.CallError(T.VersionedHostJamPeerTransportSendError)); +const recvResult = S.Result(T.VersionedHostJamPeerTransportRecvResponse, S.CallError(T.VersionedHostJamPeerTransportRecvError)); +const resetResult = S.Result(T.VersionedHostJamPeerTransportResetResponse, S.CallError(T.VersionedHostJamPeerTransportResetError)); +const closeResult = S.Result(T.VersionedHostJamPeerTransportCloseResponse, S.CallError(T.VersionedHostJamPeerTransportCloseError)); +const eventsResult = S.Result(T.VersionedHostJamPeerTransportEventsResponse, S.CallError(T.VersionedHostJamPeerTransportEventsError)); +const cancelledReply = frameworkResult.enc({ success: false, value: { tag: "Cancelled" } }); +/** Trait id of a request frame, or `undefined` when it does not decode. */ +export function frameTraitId(frame) { + const decoded = decodeWireMessage(frame); + return decoded.isOk() ? decoded.value.payload.traitId : undefined; +} +function exact(codec, bytes) { + const value = codec.dec(bytes); + const canonical = codec.enc(value); + if (canonical.length !== bytes.length || canonical.some((byte, index) => byte !== bytes[index])) { + throw new Error("Noncanonical or trailing SCALE bytes"); + } + return value; +} +function decodeFrame(bytes) { + if (!(bytes instanceof Uint8Array) || bytes.length > JAM_PEER_TRANSPORT_MAX_FRAME_BYTES) { + throw new Error("Invalid or oversized peer-transport frame"); + } + const decoded = decodeWireMessage(bytes); + if (decoded.isErr()) + throw decoded.error; + const message = decoded.value; + if (textEncoder.encode(message.requestId).length > 64) + throw new Error("Oversized request id"); + const encoded = encodeWireMessage(message); + if (encoded.isErr()) + throw encoded.error; + if (encoded.value.length !== bytes.length || encoded.value.some((byte, index) => byte !== bytes[index])) { + throw new Error("Noncanonical request frame"); + } + return message; +} +function hasIds(message, ids) { + return message.payload.traitId === ids.trait && message.payload.methodId === ids.method; +} +function reply(request, value) { + const encoded = encodeWireMessage({ + requestId: request.requestId, + payload: { ...request.payload, messageType: MESSAGE_TYPE_RESPONSE, value }, + }); + if (encoded.isErr()) + throw encoded.error; + return encoded.value; +} +function ok(codec, value) { + return codec.enc({ success: true, value }); +} +function domain(codec, error) { + return codec.enc({ success: false, value: { tag: "Domain", value: { tag: "V1", value: error } } }); +} +/** `https://` authority for a 16-byte IPv6 or v4-mapped address. */ +export function peerUrl(ip, port) { + if (ip.length !== 16) + throw new Error("peer ip must be 16 bytes"); + const v4Mapped = ip.subarray(0, 10).every((byte) => byte === 0) && ip[10] === 0xff && ip[11] === 0xff; + if (v4Mapped) + return `https://${ip[12]}.${ip[13]}.${ip[14]}.${ip[15]}:${port}`; + const groups = []; + for (let i = 0; i < 16; i += 2) + groups.push(((ip[i] << 8) | ip[i + 1]).toString(16)); + return `https://[${groups.join(":")}]:${port}`; +} +/** + * Create the browser JamPeerTransport endpoint for one execution. Every `dial` + * is authorized for its genesis through `options.authorize` before anything + * connects; the other methods act only on connections an authorized dial + * opened. A dial answers within its deadline, prompt included: one still + * waiting then answers `Unreachable`, a CANCEL naming it answers `Cancelled`, + * and in both cases whatever it opened is closed without holding a slot. The + * permission decision is remembered either way, so a retry does not ask + * again. The host must fence late replies against execution stop or + * replacement. + */ +export function createJamPeerTransportSession(options) { + const decisions = new Map(); + const authorized = (genesis) => { + let decision = decisions.get(genesis); + if (decision === undefined) { + decision = (async () => { + try { + return (await options.authorize(genesis)) === true; + } + catch { + return false; + } + })(); + decisions.set(genesis, decision); + } + return decision; + }; + const connect = options.connect ?? + ((url, hashes) => new WebTransport(url, { + serverCertificateHashes: hashes.map((value) => ({ algorithm: "sha-256", value: value })), + })); + const now = options.now ?? (() => Math.floor(Date.now() / 1000)); + const dialTimeoutMs = options.dialTimeoutMs ?? JAM_PEER_TRANSPORT_DIAL_TIMEOUT_MS; + /** In-flight dials by request id; CANCEL or `close` withdraws one with its reply. */ + const pendingDials = new Map(); + let closed = false; + let negotiated = false; + let nextConn = 1; + let nextStream = 1; + const connections = new Map(); + const streams = new Map(); + const events = []; + const pushEvent = (event) => { + if (events.length < MAX_PENDING_EVENTS) + events.push(event); + }; + const dropStream = (stream, abort) => { + streams.delete(stream.id); + stream.conn.streams.delete(stream.id); + if (abort) { + void stream.writer.abort().catch(() => undefined); + void stream.reader.cancel().catch(() => undefined); + } + }; + const dropConnection = (conn) => { + if (conn.closed) + return; + conn.closed = true; + connections.delete(conn.id); + for (const stream of [...conn.streams.values()]) + dropStream(stream, true); + try { + conn.transport.close(); + } + catch { + // Already closed by the peer. + } + pushEvent({ tag: "ConnClosed", value: { conn: conn.id } }); + }; + /** Parse complete `u32`-LE framed messages out of `stream.rx`. */ + const unframe = (stream) => { + while (stream.rx.length >= 4) { + const view = new DataView(stream.rx.buffer, stream.rx.byteOffset, stream.rx.byteLength); + const length = view.getUint32(0, true); + if (length > JAM_PEER_TRANSPORT_MAX_MESSAGE_BYTES) { + stream.reset = true; + void stream.writer.abort().catch(() => undefined); + void stream.reader.cancel().catch(() => undefined); + stream.rx = new Uint8Array(); + return; + } + if (stream.rx.length < 4 + length) + return; + stream.messages.push(stream.rx.slice(4, 4 + length)); + stream.rx = stream.rx.slice(4 + length); + } + }; + const pump = async (stream, initial) => { + stream.rx = initial; + unframe(stream); + try { + while (!stream.reset) { + const { value, done } = await stream.reader.read(); + if (done) + break; + const next = new Uint8Array(stream.rx.length + value.length); + next.set(stream.rx); + next.set(value, stream.rx.length); + stream.rx = next; + unframe(stream); + } + if (!stream.reset) { + stream.fin = true; + if (stream.rx.length !== 0) + stream.reset = true; + if (streams.has(stream.id)) + pushEvent({ tag: "StreamFin", value: { stream: stream.id } }); + } + } + catch { + stream.reset = true; + } + }; + const register = (conn, bidi, initial) => { + const stream = { + id: nextStream++, + conn, + writer: bidi.writable.getWriter(), + reader: bidi.readable.getReader(), + rx: new Uint8Array(), + messages: [], + fin: false, + reset: false, + rxConsumed: false, + txClosed: false, + txPending: 0, + }; + streams.set(stream.id, stream); + conn.streams.set(stream.id, stream); + void pump(stream, initial); + return stream; + }; + const acceptLoop = async (conn) => { + const incoming = conn.transport.incomingBidirectionalStreams.getReader(); + try { + while (!conn.closed) { + const { value: bidi, done } = await incoming.read(); + if (done || conn.closed) + break; + if (conn.streams.size >= JAM_PEER_TRANSPORT_MAX_STREAMS_PER_CONNECTION) { + void bidi.writable.abort().catch(() => undefined); + void bidi.readable.cancel().catch(() => undefined); + continue; + } + // The peer's first byte is the stream kind; anything after it is message data. + const reader = bidi.readable.getReader(); + const first = await reader.read(); + reader.releaseLock(); + if (first.done || first.value.length === 0 || conn.closed) { + void bidi.writable.abort().catch(() => undefined); + continue; + } + const stream = register(conn, bidi, first.value.subarray(1)); + pushEvent({ tag: "Accepted", value: { conn: conn.id, stream: stream.id, kind: first.value[0] } }); + } + } + catch { + // The connection is closing; `closed` handling reports it. + } + }; + /** + * One dial. `withdrawn` settles with the reply when the guest cancels or the + * deadline passes; the guest then no longer waits for what this dial opens, + * so nothing it opens outlives it or holds a connection slot. + */ + const dial = async (request, withdrawn) => { + const granted = await Promise.race([authorized(request.genesis), withdrawn]); + if (granted instanceof Uint8Array) + return granted; + if (!granted) + return domain(dialResult, "NotGranted"); + if (closed) + return frameworkResult.enc({ success: false, value: { tag: "Denied" } }); + if (connections.size >= JAM_PEER_TRANSPORT_MAX_CONNECTIONS) + return domain(dialResult, "Limit"); + // Browsers only expose WebTransport; JAMNP-S QUIC needs the P-256 identity. + if (request.p256 === undefined) + return domain(dialResult, "Unreachable"); + const p256 = S.hexToBytes(request.p256); + if (p256.length !== 33 || (p256[0] !== 2 && p256[0] !== 3)) + return domain(dialResult, "Refused"); + let transport; + try { + transport = connect(peerUrl(S.hexToBytes(request.ip), request.port), webTransportCertificateHashes(p256, now())); + } + catch { + return domain(dialResult, "Unreachable"); + } + const conn = { id: nextConn++, transport, streams: new Map(), closed: false }; + connections.set(conn.id, conn); + const failure = await Promise.race([ + transport.ready.then(() => undefined, () => domain(dialResult, "Refused")), + withdrawn, + ]); + if (failure !== undefined || closed) { + // The guest never learns this connection id, so it frees its slot + // without a `ConnClosed` event. + connections.delete(conn.id); + conn.closed = true; + try { + transport.close(); + } + catch { + // Never opened. + } + return failure ?? frameworkResult.enc({ success: false, value: { tag: "Denied" } }); + } + void transport.closed.then(() => dropConnection(conn), () => dropConnection(conn)); + void acceptLoop(conn); + return ok(dialResult, { tag: "V1", value: { conn: conn.id } }); + }; + /** Run one dial frame: register it for CANCEL and arm its deadline. */ + const dialFrame = async (requestId, request) => { + // Executor form: this package's lib target predates Promise.withResolvers. + let withdraw; + const withdrawn = new Promise((resolve) => { + withdraw = resolve; + }); + pendingDials.set(requestId, withdraw); + const timer = setTimeout(() => withdraw(domain(dialResult, "Unreachable")), dialTimeoutMs); + try { + return await dial(request, withdrawn); + } + finally { + clearTimeout(timer); + pendingDials.delete(requestId); + } + }; + const open = async (request) => { + const conn = connections.get(request.conn); + if (conn === undefined || conn.closed) + return domain(openResult, "Closed"); + if (conn.streams.size >= JAM_PEER_TRANSPORT_MAX_STREAMS_PER_CONNECTION) + return domain(openResult, "Limit"); + try { + const bidi = await conn.transport.createBidirectionalStream(); + const stream = register(conn, bidi, new Uint8Array()); + await stream.writer.write(new Uint8Array([request.kind])); + return ok(openResult, { tag: "V1", value: { stream: stream.id } }); + } + catch { + return domain(openResult, "Closed"); + } + }; + const send = async (request) => { + const stream = streams.get(request.stream); + if (stream === undefined || stream.txClosed || stream.reset || stream.conn.closed) + return domain(sendResult, "Closed"); + const message = S.hexToBytes(request.message); + if (message.length > JAM_PEER_TRANSPORT_MAX_MESSAGE_BYTES) + return domain(sendResult, "TooLarge"); + let pending = 0; + for (const other of stream.conn.streams.values()) + pending += other.txPending; + if (pending + message.length + 4 > JAM_PEER_TRANSPORT_MAX_BUFFERED_BYTES_PER_CONNECTION) + return domain(sendResult, "Limit"); + const frame = new Uint8Array(4 + message.length); + new DataView(frame.buffer).setUint32(0, message.length, true); + frame.set(message, 4); + stream.txPending += frame.length; + try { + await stream.writer.write(frame); + if (request.fin) { + stream.txClosed = true; + await stream.writer.close(); + } + return ok(sendResult, { tag: "V1" }); + } + catch { + stream.txClosed = true; + return domain(sendResult, "Closed"); + } + finally { + stream.txPending -= frame.length; + } + }; + const recv = (request) => { + const stream = streams.get(request.stream); + if (stream === undefined || stream.rxConsumed) + return domain(recvResult, "Closed"); + const next = stream.messages[0]; + if (next !== undefined && next.length > request.max) { + // The guest cannot take this message; treat it as a protocol violation. + stream.messages.length = 0; + stream.reset = true; + void stream.writer.abort().catch(() => undefined); + void stream.reader.cancel().catch(() => undefined); + } + let message; + if (!stream.reset && next !== undefined) { + stream.messages.shift(); + message = S.bytesToHex(next); + } + const drained = stream.messages.length === 0; + const fin = stream.fin && drained; + const reset = stream.reset; + if (message === undefined && (fin || reset)) { + stream.rxConsumed = true; + if (stream.txClosed || reset) + dropStream(stream, reset); + } + return ok(recvResult, { tag: "V1", value: { message, fin, reset } }); + }; + const reset = (request) => { + const stream = streams.get(request.stream); + if (stream === undefined) + return domain(resetResult, "Closed"); + dropStream(stream, true); + return ok(resetResult, { tag: "V1" }); + }; + const close = (request) => { + const conn = connections.get(request.conn); + if (conn === undefined || conn.closed) + return domain(closeResult, "Closed"); + dropConnection(conn); + return ok(closeResult, { tag: "V1" }); + }; + return { + async handleFrame(bytes) { + const request = decodeFrame(bytes); + if (request.payload.messageType === MESSAGE_TYPE_CANCEL) { + if (request.payload.traitId !== JAM_PEER_TRANSPORT_DIAL.trait || request.payload.value.length !== 0) { + throw new Error("Invalid cancellation frame"); + } + // Only a dial can outlast one host tick: it may wait on a permission + // prompt and a handshake. The dial itself answers `Cancelled`; a + // CANCEL naming nothing in flight lost the race and is dropped. + if (hasIds(request, JAM_PEER_TRANSPORT_DIAL)) + pendingDials.get(request.requestId)?.(cancelledReply); + return new Uint8Array(); + } + if (request.payload.messageType !== MESSAGE_TYPE_REQUEST) { + throw new Error("Invalid request frame"); + } + if (closed) + return reply(request, frameworkResult.enc({ success: false, value: { tag: "Denied" } })); + if (hasIds(request, SYSTEM_HANDSHAKE)) { + let handshake; + try { + handshake = exact(T.VersionedHostHandshakeRequest, request.payload.value); + } + catch { + return reply(request, frameworkResult.enc({ success: false, value: { tag: "MalformedFrame", value: { reason: "invalid handshake" } } })); + } + if (handshake.value.codecVersion !== TRUAPI_CODEC_VERSION) { + return reply(request, handshakeResult.enc({ success: false, value: { tag: "Domain", value: { tag: "V1", value: { tag: "UnsupportedProtocolVersion" } } } })); + } + negotiated = true; + return reply(request, handshakeResult.enc({ success: true, value: { tag: "V1" } })); + } + if (request.payload.traitId !== JAM_PEER_TRANSPORT_DIAL.trait) { + return reply(request, frameworkResult.enc({ success: false, value: { tag: "Denied" } })); + } + const malformed = () => reply(request, frameworkResult.enc({ success: false, value: { tag: "MalformedFrame", value: { reason: "invalid peer-transport request" } } })); + try { + if (hasIds(request, JAM_PEER_TRANSPORT_DIAL)) { + const value = exact(T.VersionedHostJamPeerTransportDialRequest, request.payload.value).value; + if (!negotiated) + return reply(request, domain(dialResult, "NotGranted")); + // Two live dials sharing an id leave neither addressable by CANCEL; + // like the core dispatcher, the second is dropped unanswered. + if (pendingDials.has(request.requestId)) + return new Uint8Array(); + return reply(request, await dialFrame(request.requestId, value)); + } + if (hasIds(request, JAM_PEER_TRANSPORT_OPEN)) { + const value = exact(T.VersionedHostJamPeerTransportOpenRequest, request.payload.value).value; + return reply(request, negotiated ? await open(value) : domain(openResult, "NotGranted")); + } + if (hasIds(request, JAM_PEER_TRANSPORT_SEND)) { + const value = exact(T.VersionedHostJamPeerTransportSendRequest, request.payload.value).value; + return reply(request, negotiated ? await send(value) : domain(sendResult, "Closed")); + } + if (hasIds(request, JAM_PEER_TRANSPORT_RECV)) { + const value = exact(T.VersionedHostJamPeerTransportRecvRequest, request.payload.value).value; + return reply(request, negotiated ? recv(value) : domain(recvResult, "Closed")); + } + if (hasIds(request, JAM_PEER_TRANSPORT_RESET)) { + const value = exact(T.VersionedHostJamPeerTransportResetRequest, request.payload.value).value; + return reply(request, negotiated ? reset(value) : domain(resetResult, "Closed")); + } + if (hasIds(request, JAM_PEER_TRANSPORT_CLOSE)) { + const value = exact(T.VersionedHostJamPeerTransportCloseRequest, request.payload.value).value; + return reply(request, negotiated ? close(value) : domain(closeResult, "Closed")); + } + if (hasIds(request, JAM_PEER_TRANSPORT_EVENTS)) { + exact(T.VersionedHostJamPeerTransportEventsRequest, request.payload.value); + if (!negotiated) + return reply(request, domain(eventsResult, "NotGranted")); + return reply(request, ok(eventsResult, { tag: "V1", value: { events: events.splice(0, events.length) } })); + } + } + catch { + return malformed(); + } + return reply(request, frameworkResult.enc({ success: false, value: { tag: "Unsupported" } })); + }, + close() { + closed = true; + const denied = frameworkResult.enc({ success: false, value: { tag: "Denied" } }); + for (const withdraw of [...pendingDials.values()]) + withdraw(denied); + for (const conn of [...connections.values()]) + dropConnection(conn); + events.length = 0; + }, + }; +} diff --git a/vendor/truapi/dist/playground/codegen/services.js b/vendor/truapi/dist/playground/codegen/services.js index b32aac85..076efbf4 100644 --- a/vendor/truapi/dist/playground/codegen/services.js +++ b/vendor/truapi/dist/playground/codegen/services.js @@ -464,6 +464,83 @@ export const services = [ }, ], }, + { + name: "Jam Peer Transport", + methods: [ + { + name: "dial", + type: "unary", + signature: "dial(request: HostJamPeerTransportDialRequest): Promise>>", + docUrl: "api/jam_peer_transport/trait.JamPeerTransport.html#method.dial", + description: "Dial one peer. The host builds the ALPN from `genesis` and requires the\npeer certificate to carry `ed25519` (QUIC) or to hash to the\ncertificate derived from `p256` (WebTransport).", + requestDescription: "HostJamPeerTransportDialRequest", + exampleSource: 'const result = await truapi.jamPeerTransport.dial({\n genesis: "0x353963b9cedfe4ea22038081052a5c151b06b55a4a026a97522cd0320cabf49f",\n ip: "0x00000000000000000000ffff7f000001",\n port: 43000,\n ed25519: "0x0000000000000000000000000000000000000000000000000000000000000000",\n p256: undefined,\n});\nif (result.isOk()) console.log("connection:", result.value.conn);', + requestType: "host-jam-peer-transport-dial-request", + responseType: "host-jam-peer-transport-dial-response", + }, + { + name: "open", + type: "unary", + signature: "open(request: HostJamPeerTransportOpenRequest): Promise>>", + docUrl: "api/jam_peer_transport/trait.JamPeerTransport.html#method.open", + description: "Open a bidirectional stream on a connection and send its kind byte.", + requestDescription: "HostJamPeerTransportOpenRequest", + exampleSource: 'const result = await truapi.jamPeerTransport.open({ conn: 0, kind: 0 });\nif (result.isOk()) console.log("stream:", result.value.stream);', + requestType: "host-jam-peer-transport-open-request", + responseType: "host-jam-peer-transport-open-response", + }, + { + name: "send", + type: "unary", + signature: "send(request: HostJamPeerTransportSendRequest): Promise>>", + docUrl: "api/jam_peer_transport/trait.JamPeerTransport.html#method.send", + description: "Queue one message; the host prepends the `u32` little-endian length.", + requestDescription: "HostJamPeerTransportSendRequest", + exampleSource: 'const result = await truapi.jamPeerTransport.send({ stream: 0, message: "0x00", fin: false });\nconsole.log("sent:", result.isOk());', + requestType: "host-jam-peer-transport-send-request", + }, + { + name: "recv", + type: "unary", + signature: "recv(request: HostJamPeerTransportRecvRequest): Promise>>", + docUrl: "api/jam_peer_transport/trait.JamPeerTransport.html#method.recv", + description: "Poll one complete message without blocking; the host strips the length.", + requestDescription: "HostJamPeerTransportRecvRequest", + exampleSource: 'const result = await truapi.jamPeerTransport.recv({ stream: 0, max: 1048576 });\nif (result.isOk()) console.log("message:", result.value.message, "fin:", result.value.fin);', + requestType: "host-jam-peer-transport-recv-request", + responseType: "host-jam-peer-transport-recv-response", + }, + { + name: "reset", + type: "unary", + signature: "reset(request: HostJamPeerTransportResetRequest): Promise>>", + docUrl: "api/jam_peer_transport/trait.JamPeerTransport.html#method.reset", + description: "Abort a stream in both directions.", + requestDescription: "HostJamPeerTransportResetRequest", + exampleSource: 'const result = await truapi.jamPeerTransport.reset({ stream: 0 });\nconsole.log("reset:", result.isOk());', + requestType: "host-jam-peer-transport-reset-request", + }, + { + name: "close", + type: "unary", + signature: "close(request: HostJamPeerTransportCloseRequest): Promise>>", + docUrl: "api/jam_peer_transport/trait.JamPeerTransport.html#method.close", + description: "Close a connection and every stream on it.", + requestDescription: "HostJamPeerTransportCloseRequest", + exampleSource: 'const result = await truapi.jamPeerTransport.close({ conn: 0 });\nconsole.log("closed:", result.isOk());', + requestType: "host-jam-peer-transport-close-request", + }, + { + name: "events", + type: "unary", + signature: "events(): Promise>>", + docUrl: "api/jam_peer_transport/trait.JamPeerTransport.html#method.events", + description: "Drain connection, stream-finish and inbound-stream events.", + exampleSource: 'const result = await truapi.jamPeerTransport.events();\nif (result.isOk()) console.log("events:", result.value.events);', + responseType: "host-jam-peer-transport-events-response", + }, + ], + }, { name: "Local Storage", methods: [ diff --git a/vendor/truapi/dist/playground/codegen/truapi-dts.d.ts b/vendor/truapi/dist/playground/codegen/truapi-dts.d.ts index d6feac49..88ad28ac 100644 --- a/vendor/truapi/dist/playground/codegen/truapi-dts.d.ts +++ b/vendor/truapi/dist/playground/codegen/truapi-dts.d.ts @@ -1 +1 @@ -export declare const truapiDts = "// neverthrow (inlined)\n\ninterface ErrorConfig {\n withStackTrace: boolean;\n}\n\ndeclare class ResultAsync implements PromiseLike> {\n private _promise;\n constructor(res: Promise>);\n static fromSafePromise(promise: PromiseLike): ResultAsync;\n static fromPromise(promise: PromiseLike, errorFn: (e: unknown) => E): ResultAsync;\n static fromThrowable(fn: (...args: A) => Promise, errorFn?: (err: unknown) => E): (...args: A) => ResultAsync;\n static combine, ...ResultAsync[]]>(asyncResultList: T): CombineResultAsyncs;\n static combine[]>(asyncResultList: T): CombineResultAsyncs;\n static combineWithAllErrors, ...ResultAsync[]]>(asyncResultList: T): CombineResultsWithAllErrorsArrayAsync;\n static combineWithAllErrors[]>(asyncResultList: T): CombineResultsWithAllErrorsArrayAsync;\n map(f: (t: T) => A | Promise): ResultAsync;\n andThrough(f: (t: T) => Result | ResultAsync): ResultAsync;\n andTee(f: (t: T) => unknown): ResultAsync;\n orTee(f: (t: E) => unknown): ResultAsync;\n mapErr(f: (e: E) => U | Promise): ResultAsync;\n andThen>(f: (t: T) => R): ResultAsync, InferErrTypes | E>;\n andThen>(f: (t: T) => R): ResultAsync, InferAsyncErrTypes | E>;\n andThen(f: (t: T) => Result | ResultAsync): ResultAsync;\n orElse>(f: (e: E) => R): ResultAsync | T, InferErrTypes>;\n orElse>(f: (e: E) => R): ResultAsync | T, InferAsyncErrTypes>;\n orElse(f: (e: E) => Result | ResultAsync): ResultAsync;\n match(ok: (t: T) => A, _err: (e: E) => B): Promise;\n unwrapOr(t: A): Promise;\n /**\n * @deprecated will be removed in 9.0.0.\n *\n * You can use `safeTry` without this method.\n * @example\n * ```typescript\n * safeTry(async function* () {\n * const okValue = yield* yourResult\n * })\n * ```\n * Emulates Rust's `?` operator in `safeTry`'s body. See also `safeTry`.\n */\n safeUnwrap(): AsyncGenerator, T>;\n then(successCallback?: (res: Result) => A | PromiseLike, failureCallback?: (reason: unknown) => B | PromiseLike): PromiseLike;\n [Symbol.asyncIterator](): AsyncGenerator, T>;\n}\ndeclare function okAsync(value: T): ResultAsync;\ndeclare function okAsync(value: void): ResultAsync;\ndeclare function errAsync(err: E): ResultAsync;\ndeclare function errAsync(err: void): ResultAsync;\ndeclare const fromPromise: typeof ResultAsync.fromPromise;\ndeclare const fromSafePromise: typeof ResultAsync.fromSafePromise;\ndeclare const fromAsyncThrowable: typeof ResultAsync.fromThrowable;\ndeclare type CombineResultAsyncs[]> = IsLiteralArray extends 1 ? TraverseAsync> : ResultAsync, ExtractErrAsyncTypes[number]>;\ndeclare type CombineResultsWithAllErrorsArrayAsync[]> = IsLiteralArray extends 1 ? TraverseWithAllErrorsAsync> : ResultAsync, ExtractErrAsyncTypes[number][]>;\ndeclare type UnwrapAsync = IsLiteralArray extends 1 ? Writable extends [infer H, ...infer Rest] ? H extends PromiseLike ? HI extends Result ? [Dedup, ...UnwrapAsync] : never : never : [] : T extends Array ? A extends PromiseLike ? HI extends Result ? Ok[] : never : never : never;\ndeclare type TraverseAsync = IsLiteralArray extends 1 ? Combine extends [infer Oks, infer Errs] ? ResultAsync, MembersToUnion> : never : T extends Array ? Combine, Depth> extends [infer Oks, infer Errs] ? Oks extends unknown[] ? Errs extends unknown[] ? ResultAsync, MembersToUnion> : ResultAsync, Errs> : Errs extends unknown[] ? ResultAsync> : ResultAsync : never : never;\ndeclare type TraverseWithAllErrorsAsync = TraverseAsync extends ResultAsync ? ResultAsync : never;\ndeclare type Writable = T extends ReadonlyArray ? [...T] : T;\n\ndeclare type ExtractOkTypes[]> = {\n [idx in keyof T]: T[idx] extends Result ? U : never;\n};\ndeclare type ExtractOkAsyncTypes[]> = {\n [idx in keyof T]: T[idx] extends ResultAsync ? U : never;\n};\ndeclare type ExtractErrTypes[]> = {\n [idx in keyof T]: T[idx] extends Result ? E : never;\n};\ndeclare type ExtractErrAsyncTypes[]> = {\n [idx in keyof T]: T[idx] extends ResultAsync ? E : never;\n};\ndeclare type InferOkTypes = R extends Result ? T : never;\ndeclare type InferErrTypes = R extends Result ? E : never;\ndeclare type InferAsyncOkTypes = R extends ResultAsync ? T : never;\ndeclare type InferAsyncErrTypes = R extends ResultAsync ? E : never;\n\ndeclare namespace Result {\n /**\n * Wraps a function with a try catch, creating a new function with the same\n * arguments but returning `Ok` if successful, `Err` if the function throws\n *\n * @param fn function to wrap with ok on success or err on failure\n * @param errorFn when an error is thrown, this will wrap the error result if provided\n */\n function fromThrowable any, E>(fn: Fn, errorFn?: (e: unknown) => E): (...args: Parameters) => Result, E>;\n function combine, ...Result[]]>(resultList: T): CombineResults;\n function combine[]>(resultList: T): CombineResults;\n function combineWithAllErrors, ...Result[]]>(resultList: T): CombineResultsWithAllErrorsArray;\n function combineWithAllErrors[]>(resultList: T): CombineResultsWithAllErrorsArray;\n}\ndeclare type Result = Ok | Err;\ndeclare function ok(value: T): Ok;\ndeclare function ok(value: void): Ok;\ndeclare function err(err: E): Err;\ndeclare function err(err: E): Err;\ndeclare function err(err: void): Err;\n/**\n * Evaluates the given generator to a Result returned or an Err yielded from it,\n * whichever comes first.\n *\n * This function is intended to emulate Rust's ? operator.\n * See `/tests/safeTry.test.ts` for examples.\n *\n * @param body - What is evaluated. In body, `yield* result` works as\n * Rust's `result?` expression.\n * @returns The first occurrence of either an yielded Err or a returned Result.\n */\ndeclare function safeTry(body: () => Generator, Result>): Result;\ndeclare function safeTry, GeneratorReturnResult extends Result>(body: () => Generator): Result, InferErrTypes | InferErrTypes>;\n/**\n * Evaluates the given generator to a Result returned or an Err yielded from it,\n * whichever comes first.\n *\n * This function is intended to emulate Rust's ? operator.\n * See `/tests/safeTry.test.ts` for examples.\n *\n * @param body - What is evaluated. In body, `yield* result` and\n * `yield* resultAsync` work as Rust's `result?` expression.\n * @returns The first occurrence of either an yielded Err or a returned Result.\n */\ndeclare function safeTry(body: () => AsyncGenerator, Result>): ResultAsync;\ndeclare function safeTry, GeneratorReturnResult extends Result>(body: () => AsyncGenerator): ResultAsync, InferErrTypes | InferErrTypes>;\ninterface IResult {\n /**\n * Used to check if a `Result` is an `OK`\n *\n * @returns `true` if the result is an `OK` variant of Result\n */\n isOk(): this is Ok;\n /**\n * Used to check if a `Result` is an `Err`\n *\n * @returns `true` if the result is an `Err` variant of Result\n */\n isErr(): this is Err;\n /**\n * Maps a `Result` to `Result`\n * by applying a function to a contained `Ok` value, leaving an `Err` value\n * untouched.\n *\n * @param f The function to apply an `OK` value\n * @returns the result of applying `f` or an `Err` untouched\n */\n map(f: (t: T) => A): Result;\n /**\n * Maps a `Result` to `Result` by applying a function to a\n * contained `Err` value, leaving an `Ok` value untouched.\n *\n * This function can be used to pass through a successful result while\n * handling an error.\n *\n * @param f a function to apply to the error `Err` value\n */\n mapErr(f: (e: E) => U): Result;\n /**\n * Similar to `map` Except you must return a new `Result`.\n *\n * This is useful for when you need to do a subsequent computation using the\n * inner `T` value, but that computation might fail.\n * Additionally, `andThen` is really useful as a tool to flatten a\n * `Result, E1>` into a `Result` (see example below).\n *\n * @param f The function to apply to the current value\n */\n andThen>(f: (t: T) => R): Result, InferErrTypes | E>;\n andThen(f: (t: T) => Result): Result;\n /**\n * This \"tee\"s the current value to an passed-in computation such as side\n * effect functions but still returns the same current value as the result.\n *\n * This is useful when you want to pass the current result to your side-track\n * work such as logging but want to continue main-track work after that.\n * This method does not care about the result of the passed in computation.\n *\n * @param f The function to apply to the current value\n */\n andTee(f: (t: T) => unknown): Result;\n /**\n * This \"tee\"s the current `Err` value to an passed-in computation such as side\n * effect functions but still returns the same `Err` value as the result.\n *\n * This is useful when you want to pass the current `Err` value to your side-track\n * work such as logging but want to continue error-track work after that.\n * This method does not care about the result of the passed in computation.\n *\n * @param f The function to apply to the current `Err` value\n */\n orTee(f: (t: E) => unknown): Result;\n /**\n * Similar to `andTee` except error result of the computation will be passed\n * to the downstream in case of an error.\n *\n * This version is useful when you want to make side-effects but in case of an\n * error, you want to pass the error to the downstream.\n *\n * @param f The function to apply to the current value\n */\n andThrough>(f: (t: T) => R): Result | E>;\n andThrough(f: (t: T) => Result): Result;\n /**\n * Takes an `Err` value and maps it to a `Result`.\n *\n * This is useful for error recovery.\n *\n *\n * @param f A function to apply to an `Err` value, leaving `Ok` values\n * untouched.\n */\n orElse>(f: (e: E) => R): Result | T, InferErrTypes>;\n orElse(f: (e: E) => Result): Result;\n /**\n * Similar to `map` Except you must return a new `Result`.\n *\n * This is useful for when you need to do a subsequent async computation using\n * the inner `T` value, but that computation might fail. Must return a ResultAsync\n *\n * @param f The function that returns a `ResultAsync` to apply to the current\n * value\n */\n asyncAndThen(f: (t: T) => ResultAsync): ResultAsync;\n /**\n * Maps a `Result` to `ResultAsync`\n * by applying an async function to a contained `Ok` value, leaving an `Err`\n * value untouched.\n *\n * @param f An async function to apply an `OK` value\n */\n asyncMap(f: (t: T) => Promise): ResultAsync;\n /**\n * Unwrap the `Ok` value, or return the default if there is an `Err`\n *\n * @param v the default value to return if there is an `Err`\n */\n unwrapOr(v: A): T | A;\n /**\n *\n * Given 2 functions (one for the `Ok` variant and one for the `Err` variant)\n * execute the function that matches the `Result` variant.\n *\n * Match callbacks do not necessitate to return a `Result`, however you can\n * return a `Result` if you want to.\n *\n * `match` is like chaining `map` and `mapErr`, with the distinction that\n * with `match` both functions must have the same return type.\n *\n * @param ok\n * @param err\n */\n match(ok: (t: T) => A, err: (e: E) => B): A | B;\n /**\n * @deprecated will be removed in 9.0.0.\n *\n * You can use `safeTry` without this method.\n * @example\n * ```typescript\n * safeTry(function* () {\n * const okValue = yield* yourResult\n * })\n * ```\n * Emulates Rust's `?` operator in `safeTry`'s body. See also `safeTry`.\n */\n safeUnwrap(): Generator, T>;\n /**\n * **This method is unsafe, and should only be used in a test environments**\n *\n * Takes a `Result` and returns a `T` when the result is an `Ok`, otherwise it throws a custom object.\n *\n * @param config\n */\n _unsafeUnwrap(config?: ErrorConfig): T;\n /**\n * **This method is unsafe, and should only be used in a test environments**\n *\n * takes a `Result` and returns a `E` when the result is an `Err`,\n * otherwise it throws a custom object.\n *\n * @param config\n */\n _unsafeUnwrapErr(config?: ErrorConfig): E;\n}\ndeclare class Ok implements IResult {\n readonly value: T;\n constructor(value: T);\n isOk(): this is Ok;\n isErr(): this is Err;\n map(f: (t: T) => A): Result;\n mapErr(_f: (e: E) => U): Result;\n andThen>(f: (t: T) => R): Result, InferErrTypes | E>;\n andThen(f: (t: T) => Result): Result;\n andThrough>(f: (t: T) => R): Result | E>;\n andThrough(f: (t: T) => Result): Result;\n andTee(f: (t: T) => unknown): Result;\n orTee(_f: (t: E) => unknown): Result;\n orElse>(_f: (e: E) => R): Result | T, InferErrTypes>;\n orElse(_f: (e: E) => Result): Result;\n asyncAndThen(f: (t: T) => ResultAsync): ResultAsync;\n asyncAndThrough>(f: (t: T) => R): ResultAsync | E>;\n asyncAndThrough(f: (t: T) => ResultAsync): ResultAsync;\n asyncMap(f: (t: T) => Promise): ResultAsync;\n unwrapOr(_v: A): T | A;\n match(ok: (t: T) => A, _err: (e: E) => B): A | B;\n safeUnwrap(): Generator, T>;\n _unsafeUnwrap(_?: ErrorConfig): T;\n _unsafeUnwrapErr(config?: ErrorConfig): E;\n [Symbol.iterator](): Generator, T>;\n}\ndeclare class Err implements IResult {\n readonly error: E;\n constructor(error: E);\n isOk(): this is Ok;\n isErr(): this is Err;\n map(_f: (t: T) => A): Result;\n mapErr(f: (e: E) => U): Result;\n andThrough(_f: (t: T) => Result): Result;\n andTee(_f: (t: T) => unknown): Result;\n orTee(f: (t: E) => unknown): Result;\n andThen>(_f: (t: T) => R): Result, InferErrTypes | E>;\n andThen(_f: (t: T) => Result): Result;\n orElse>(f: (e: E) => R): Result | T, InferErrTypes>;\n orElse(f: (e: E) => Result): Result;\n asyncAndThen(_f: (t: T) => ResultAsync): ResultAsync;\n asyncAndThrough(_f: (t: T) => ResultAsync): ResultAsync;\n asyncMap(_f: (t: T) => Promise): ResultAsync;\n unwrapOr(v: A): T | A;\n match(_ok: (t: T) => A, err: (e: E) => B): A | B;\n safeUnwrap(): Generator, T>;\n _unsafeUnwrap(config?: ErrorConfig): T;\n _unsafeUnwrapErr(_?: ErrorConfig): E;\n [Symbol.iterator](): Generator, T>;\n}\ndeclare const fromThrowable: typeof Result.fromThrowable;\ndeclare type Prev = [\n never,\n 0,\n 1,\n 2,\n 3,\n 4,\n 5,\n 6,\n 7,\n 8,\n 9,\n 10,\n 11,\n 12,\n 13,\n 14,\n 15,\n 16,\n 17,\n 18,\n 19,\n 20,\n 21,\n 22,\n 23,\n 24,\n 25,\n 26,\n 27,\n 28,\n 29,\n 30,\n 31,\n 32,\n 33,\n 34,\n 35,\n 36,\n 37,\n 38,\n 39,\n 40,\n 41,\n 42,\n 43,\n 44,\n 45,\n 46,\n 47,\n 48,\n 49,\n ...0[]\n];\ndeclare type CollectResults = [\n Depth\n] extends [never] ? [] : T extends [infer H, ...infer Rest] ? H extends Result ? CollectResults : never : Collected;\ndeclare type Transpose = A extends [infer T, ...infer Rest] ? T extends [infer L, infer R] ? Transposed extends [infer PL, infer PR] ? PL extends unknown[] ? PR extends unknown[] ? Transpose : never : never : Transpose : Transposed : Transposed;\ndeclare type Combine = Transpose, [], Depth> extends [\n infer L,\n infer R\n] ? [UnknownMembersToNever, UnknownMembersToNever] : Transpose, [], Depth> extends [] ? [[], []] : never;\ndeclare type Dedup = T extends Result ? [unknown] extends [RL] ? Err : Ok : T;\ndeclare type MemberListOf = ((T extends unknown ? (t: T) => T : never) extends infer U ? (U extends unknown ? (u: U) => unknown : never) extends (v: infer V) => unknown ? V : never : never) extends (_: unknown) => infer W ? [...MemberListOf>, W] : [];\ndeclare type EmptyArrayToNever = T extends [] ? never : NeverArrayToNever extends 1 ? T extends [never, ...infer Rest] ? [EmptyArrayToNever] extends [never] ? never : T : T : T;\ndeclare type UnknownMembersToNever = T extends [infer H, ...infer R] ? [[unknown] extends [H] ? never : H, ...UnknownMembersToNever] : T;\ndeclare type MembersToUnion = T extends unknown[] ? T[number] : never;\ndeclare type IsLiteralArray = T extends {\n length: infer L;\n} ? L extends number ? number extends L ? 0 : 1 : 0 : 0;\ndeclare type Traverse = Combine extends [infer Oks, infer Errs] ? Result, MembersToUnion> : never;\ndeclare type TraverseWithAllErrors = Traverse extends Result ? Result : never;\ndeclare type CombineResults[]> = IsLiteralArray extends 1 ? Traverse : Result, ExtractErrTypes[number]>;\ndeclare type CombineResultsWithAllErrorsArray[]> = IsLiteralArray extends 1 ? TraverseWithAllErrors : Result, ExtractErrTypes[number][]>;\n\n\n\n// scale.d.ts (module-scope)\n\n/** SCALE codec primitives used by the generated client.\n *\n * Thin wrapper over `scale-ts`: re-exports its primitives and combinators,\n * plus the Polkadot-flavour helpers it does not ship (hex-encoded bytes,\n * lazy recursive codecs, and `V`-indexed tagged unions).\n */\nimport { type Codec, type ResultPayload } from \"scale-ts\";\nexport type { Codec };\nexport type { ResultPayload } from \"scale-ts\";\n/**\n * Bare-named type alias matching generated codegen's naming convention for\n * generic wire types: `Result` is used as both a value (the codec\n * builder re-exported below) and a type (this alias for scale-ts's own\n * `ResultPayload`) in generated `types.ts`.\n */\nexport type Result = ResultPayload;\nexport { Bytes, Enum, Option, Result, Struct, Tuple, Vector, _void, compact, i8, i16, i32, i64, i128, str, u8, u16, u32, u64, u128, } from \"scale-ts\";\n/** SCALE boolean, rejecting byte values Rust cannot decode. */\nexport declare const bool: Codec;\n/**\n * Substrate `OptionBool`: a one-byte `Option`.\n *\n * Canonical SCALE encoding (matches `parity_scale_codec::OptionBool`):\n * `undefined` \u2192 `0`, `true` \u2192 `1`, `false` \u2192 `2`.\n */\nexport declare const OptionBool: Codec;\n/** Hex-encoded byte string, e.g. `\"0xdeadbeef\"`. */\nexport type HexString = `0x${string}`;\n/** Assert that a string is a valid hex string (`0x...`). */\nexport declare function toHexString(value: string): HexString;\n/** Encode a byte array as a lower-case hex string with a `0x` prefix. */\nexport declare function bytesToHex(bytes: Uint8Array): HexString;\n/** Decode a hex string into a byte array. Tolerates a missing `0x` prefix. */\nexport declare function hexToBytes(hex: string): Uint8Array;\n/**\n * SCALE codec for hex-encoded byte strings.\n *\n * Encode accepts a `0x`-prefixed hex string and emits SCALE bytes; decode\n * returns the bytes as a hex string. Pass `length` for fixed-size byte arrays\n * (`[u8; N]`); omit it for variable-length byte vectors (`Vec`).\n */\nexport declare function Hex(length?: number): Codec;\n/**\n * Same wire format as `scale-ts`'s `Enum`, but exposes `value` as optional in\n * the public TS type when the variant codec is `Codec`. Lets unit\n * variants of mixed enums round-trip as `{ tag: \"X\" }` (no `value` key).\n */\nexport declare function TaggedUnion(inner: O): Codec>;\n/** Public TS value for Rust's derived `CallError` enum. */\nexport type CallErrorValue = {\n tag: \"Domain\";\n value: D;\n} | {\n tag: \"Denied\";\n value?: undefined;\n} | {\n tag: \"Unsupported\";\n value?: undefined;\n} | {\n tag: \"MalformedFrame\";\n value: {\n reason: string;\n };\n} | {\n tag: \"HostFailure\";\n value: {\n reason: string;\n };\n} | {\n tag: \"Cancelled\";\n value?: undefined;\n};\n/** SCALE codec for Rust's derived `CallError` enum. */\nexport declare function CallError(domain: Codec): Codec>;\ntype TaggedUnionCodecs = {\n [Sym: symbol]: never;\n [Num: number]: never;\n [Str: string]: Codec;\n};\ntype TaggedUnionValue = {\n [K in keyof O & string]: O[K] extends Codec ? [T] extends [undefined] ? {\n tag: K;\n value?: undefined;\n } : {\n tag: K;\n value: T;\n } : never;\n}[keyof O & string];\n/**\n * Enum without payloads \u2014 maps string labels to SCALE discriminant bytes.\n *\n * `scale-ts` models `Enum({ Foo: _void, Bar: _void })` as tagged objects. For\n * user-facing TrUAPI enums with only unit variants, we keep the public TS shape\n * as a plain string union instead.\n */\nexport declare function Status(...variants: readonly T[]): Codec;\n/**\n * Defers codec construction until first use so recursive generated codecs can\n * reference each other safely.\n */\nexport declare function lazy(factory: () => Codec): Codec;\ntype IndexedVariantCodec = readonly [index: number, codec: Codec];\ntype IndexedVariantValue>, K extends keyof Variants & string> = Variants[K] extends IndexedVariantCodec ? [T] extends [undefined] ? {\n tag: K;\n value?: undefined;\n} : {\n tag: K;\n value: T;\n} : never;\n/**\n * Builds a tagged union codec with explicit SCALE discriminants.\n *\n * `scale-ts` assigns enum indexes by object key order. TrUAPI versioned enums pin\n * `V` to index `N - 1`, including V2-only enums, so generated codecs use this\n * helper for versioned wire wrappers.\n */\nexport declare function indexedTaggedUnion>>(variants: Variants): Codec<{\n [K in keyof Variants & string]: IndexedVariantValue;\n}[keyof Variants & string]>;\n\n\n// generated/types.d.ts (namespace T)\n\ndeclare namespace T {\n/**\n * A press on a button the host draws for a `ChatMessageContent::Actions`\n * message.\n */\nexport interface ActionTrigger {\n /**\n * Message containing the action, as returned by `Chat::post_message` in\n * [`HostChatPostMessageResponse::message_id`].\n */\n messageId: string;\n /** Which action was triggered. */\n actionId: string;\n /** Optional additional data. */\n payload?: HexString;\n}\nexport const ActionTrigger: Codec;\n/**\n * A resource the host can pre-allocate on behalf of the product (RFC 0010).\n *\n * For the slot-table allowances (`StatementStoreAllowance`,\n * `BulletinAllowance`, `SmartContractAllowance`), pre-allocation is\n * opportunistic and the host may also fulfil the allowance implicitly on the\n * first submission. `AutoSigning` must be requested explicitly through this\n * call.\n */\nexport type AllocatableResource = \n/** Statement Store slot allowance for the product's own allowance account. */\n{\n tag: \"StatementStoreAllowance\";\n value?: undefined;\n}\n/** Bulletin chain slot allowance for the product's own allowance account. */\n | {\n tag: \"BulletinAllowance\";\n value?: undefined;\n}\n/**\n * Pre-warmed PGAS balance for the product account selected by this\n * derivation index.\n */\n | {\n tag: \"SmartContractAllowance\";\n value: DerivationIndex;\n}\n/** Permission to sign on the product's behalf without per-call user prompts. */\n | {\n tag: \"AutoSigning\";\n value?: undefined;\n};\nexport const AllocatableResource: Codec;\n/** Outcome of allocating a single resource (RFC 0010). */\nexport type AllocationOutcome = \"Allocated\" | \"Rejected\" | \"NotAvailable\";\nexport const AllocationOutcome: Codec;\n/** Main-axis distribution of children. */\nexport type Arrangement = \"Start\" | \"End\" | \"Center\" | \"SpaceBetween\" | \"SpaceAround\" | \"SpaceEvenly\";\nexport const Arrangement: Codec;\n/** Background styling. */\nexport interface Background {\n /** Background color. */\n color: ColorToken;\n /** Background shape. */\n shape?: Shape;\n}\nexport const Background: Codec;\n/**\n * How a node composites with what is behind it. The values are those common\n * to CSS `mix-blend-mode`, SwiftUI `BlendMode` and Compose `BlendMode`.\n */\nexport type BlendingMode = \"Normal\" | \"Multiply\" | \"Screen\" | \"Overlay\" | \"Darken\" | \"Lighten\" | \"ColorDodge\" | \"ColorBurn\" | \"HardLight\" | \"SoftLight\" | \"Difference\" | \"Exclusion\" | \"Hue\" | \"Saturation\" | \"Color\" | \"Luminosity\";\nexport const BlendingMode: Codec;\n/** Border styling. */\nexport interface BorderStyle {\n /** Border width. */\n width: Size;\n /** Border color. */\n color: ColorToken;\n /** Border shape. */\n shape?: Shape;\n}\nexport const BorderStyle: Codec;\n/** Properties of a `Box`. */\nexport interface BoxProps {\n /** Placement of content within the box. */\n contentAlignment?: ContentAlignment;\n}\nexport const BoxProps: Codec;\n/** Properties of a `Button`. */\nexport interface ButtonProps {\n /** Button label. */\n text: string;\n /** Button emphasis. */\n variant?: ButtonVariant;\n /** Whether the button accepts presses. Absent leaves the default to the host. */\n enabled?: boolean;\n /**\n * Whether the button shows a loading state. A loading button accepts no\n * presses. Absent leaves the default to the host.\n */\n loading?: boolean;\n /** Action triggered on press. A button without one is inert. */\n clickAction?: string;\n}\nexport const ButtonProps: Codec;\n/** Button emphasis. */\nexport type ButtonVariant = \"Primary\" | \"Secondary\" | \"Text\";\nexport const ButtonVariant: Codec;\n/**\n * A 32-byte value, passed as plain bytes on FFI surfaces. Version-neutral:\n * the FFI conversion below applies to `[u8; 32]` fields in every protocol\n * version.\n */\nexport type Bytes32 = HexString;\nexport const Bytes32: Codec;\n/** Role of a chain within the host's configured environment. */\nexport type ChainIdentifier = \"Relay\" | \"AssetHub\" | \"People\" | \"Bulletin\";\nexport const ChainIdentifier: Codec;\n/** A clickable action button in a chat message. */\nexport interface ChatAction {\n /** Action identifier. */\n actionId: string;\n /** Button label. */\n title: string;\n}\nexport const ChatAction: Codec;\n/** Layout for action buttons. */\nexport type ChatActionLayout = \"Column\" | \"Grid\";\nexport const ChatActionLayout: Codec;\n/** Payload of a received chat action. */\nexport type ChatActionPayload = \n/** A peer posted a message. */\n{\n tag: \"MessagePosted\";\n value: ChatMessageContent;\n}\n/** A user pressed a host-drawn `Actions` button. */\n | {\n tag: \"ActionTriggered\";\n value: ActionTrigger;\n}\n/** A user issued a command. */\n | {\n tag: \"Command\";\n value: ChatCommand;\n};\nexport const ChatActionPayload: Codec;\n/** A set of action buttons with optional text. */\nexport interface ChatActions {\n /** Optional message text. */\n text?: string;\n /** List of action buttons. */\n actions: Array;\n /** `Column` or `Grid` layout. */\n layout: ChatActionLayout;\n}\nexport const ChatActions: Codec;\n/** Whether the bot was newly registered or already existed. */\nexport type ChatBotRegistrationStatus = \"New\" | \"Exists\";\nexport const ChatBotRegistrationStatus: Codec;\n/** A slash command from a chat user. */\nexport interface ChatCommand {\n /** Command name. */\n command: string;\n /** Command arguments. */\n payload: string;\n}\nexport const ChatCommand: Codec;\n/**\n * A custom message with application-defined type and binary payload. The\n * host draws it through `Renderer::render`, with a `ChatMessage` context\n * carrying `message_type` and `payload` as the render payload.\n */\nexport interface ChatCustomMessage {\n /** Application-defined type key. */\n messageType: string;\n /** Binary payload. */\n payload: HexString;\n}\nexport const ChatCustomMessage: Codec;\n/** A file attachment in a chat message. */\nexport interface ChatFile {\n /** File download URL. */\n url: string;\n /** File name. */\n fileName: string;\n /** MIME type. */\n mimeType: string;\n /** File size in bytes. */\n sizeBytes: bigint;\n /** Optional caption text. */\n text?: string;\n}\nexport const ChatFile: Codec;\n/** A media attachment. */\nexport interface ChatMedia {\n /** Media URL. */\n url: string;\n}\nexport const ChatMedia: Codec;\n/** Content of a chat message -- one of several types. */\nexport type ChatMessageContent = \n/** Plain text message. */\n{\n tag: \"Text\";\n value: {\n text: string;\n };\n}\n/** Rich text with media. */\n | {\n tag: \"RichText\";\n value: ChatRichText;\n}\n/** Action button set. */\n | {\n tag: \"Actions\";\n value: ChatActions;\n}\n/** File attachment. */\n | {\n tag: \"File\";\n value: ChatFile;\n}\n/** Emoji reaction. */\n | {\n tag: \"Reaction\";\n value: ChatReaction;\n}\n/** Reaction removal. */\n | {\n tag: \"ReactionRemoved\";\n value: ChatReaction;\n}\n/** Custom message. */\n | {\n tag: \"Custom\";\n value: ChatCustomMessage;\n};\nexport const ChatMessageContent: Codec;\n/** A reaction to a chat message. */\nexport interface ChatReaction {\n /** Message being reacted to. */\n messageId: string;\n /** Emoji reaction. */\n emoji: string;\n}\nexport const ChatReaction: Codec;\n/** Rich text message with optional media. */\nexport interface ChatRichText {\n /** Optional text content. */\n text?: string;\n /** Attached media items. */\n media: Array;\n}\nexport const ChatRichText: Codec;\n/** A chat room the product participates in. */\nexport interface ChatRoom {\n /** Room identifier. */\n roomId: string;\n /** `RoomHost` or `Bot`. */\n participatingAs: ChatRoomParticipation;\n}\nexport const ChatRoom: Codec;\n/** How the product participates in a chat room. */\nexport type ChatRoomParticipation = \"RoomHost\" | \"Bot\";\nexport const ChatRoomParticipation: Codec;\n/** Whether the room was newly created or already existed. */\nexport type ChatRoomRegistrationStatus = \"New\" | \"Exists\";\nexport const ChatRoomRegistrationStatus: Codec;\n/** Standardized encrypted Coinage secret transmission payload. */\nexport interface CoinPaymentCheque {\n /** Receivable public key protecting the cheque contents. */\n id: HexString;\n /** Claimed payment amount. */\n amount: number;\n /** Concatenated coin secrets encrypted to the receivable. */\n encryptedSecrets: HexString;\n}\nexport const CoinPaymentCheque: Codec;\n/** Product-visible clearing reference for reconciliation and receipts. */\nexport interface CoinPaymentClearingReference {\n /** Clearing Merkle root. */\n root: HexString;\n /** Product-visible coin key and transaction hash leaves. */\n leaves: Array<[HexString, HexString]>;\n}\nexport const CoinPaymentClearingReference: Codec;\n/** Errors returned by CoinPayment host operations. */\nexport type CoinPaymentError = \"BalanceLow\" | \"Denied\" | \"BadCoins\" | \"SnipedCoins\" | \"PurseNotFound\" | \"ReceivableNotFound\" | \"UnsupportedChannel\" | \"UserAgentCapabilityUnavailable\" | \"Internal\";\nexport const CoinPaymentError: Codec;\n/** Product-visible metadata and balance state for a CoinPayment purse. */\nexport interface CoinPaymentPurseInfo {\n /** Human-readable purse name supplied by the creating product. */\n name: string;\n /** Creation timestamp. */\n created: bigint;\n /** Product that created the purse. */\n creator: string;\n /** Current product-visible balance. */\n balance: number;\n}\nexport const CoinPaymentPurseInfo: Codec;\n/** Clearing status stream item. */\nexport type CoinPaymentStatus = \n/** More coins have cleared. */\n{\n tag: \"Clearing\";\n value: {\n clearing: number;\n cleared: number;\n };\n}\n/** Some or all coins failed to transfer. */\n | {\n tag: \"Failed\";\n value: {\n error: CoinPaymentError;\n cleared: number;\n reference: CoinPaymentClearingReference;\n };\n}\n/** All coins cleared. */\n | {\n tag: \"Done\";\n value: {\n cleared: number;\n reference: CoinPaymentClearingReference;\n };\n};\nexport const CoinPaymentStatus: Codec;\n/** Standardized cheque transmission channel. */\nexport type CoinPaymentTransmissionChannel = \n/** Statement-store/HOP handoff identified by an SSS topic. */\n{\n tag: \"Standard\";\n value: {\n sssTopic: HexString;\n };\n};\nexport const CoinPaymentTransmissionChannel: Codec;\n/** Semantic color tokens, resolved by the host's theme. */\nexport type ColorToken = \"FgPrimary\" | \"FgSecondary\" | \"FgTertiary\" | \"BgSurfaceMain\" | \"BgSurfaceContainer\" | \"BgSurfaceNested\" | \"FgSuccess\" | \"FgError\" | \"FgWarning\";\nexport const ColorToken: Codec;\n/** Properties of a `Column`. */\nexport interface ColumnProps {\n /** Cross-axis alignment of children. */\n horizontalAlignment?: HorizontalAlignment;\n /** Main-axis distribution of children. */\n verticalArrangement?: Arrangement;\n}\nexport const ColumnProps: Codec;\n/**\n * A contact as a product knows them: 32 bytes and nothing else.\n *\n * Its own type rather than a bare [`Bytes32`], because an account id is also\n * 32 bytes. A product that could pass one where the other is expected would\n * build a valid-looking transfer to an address nobody controls. A handle is\n * not an address, and the type is where that is said.\n */\nexport interface ContactHandle {\n /** The handle's bytes. */\n bytes: Bytes32;\n}\nexport const ContactHandle: Codec;\n/**\n * How a contact pick ended.\n *\n * Distinguishing these matters to a product deciding what to do next: a\n * dismissal is worth retrying, an empty list is not.\n */\nexport type ContactPickOutcome = \n/**\n * The user chose someone.\n *\n * `handle` is the same value for this person in every product, and on every\n * host of this user. It is not an address and cannot be turned into one:\n * the core resolves it when it builds a transaction, so a product can name\n * a recipient it never learns the account of.\n */\n{\n tag: \"Picked\";\n value: {\n handle: ContactHandle;\n };\n}\n/** The user closed the picker without choosing. */\n | {\n tag: \"Dismissed\";\n value?: undefined;\n}\n/** The user has no contacts, so no picker was shown. */\n | {\n tag: \"NoContacts\";\n value?: undefined;\n};\nexport const ContactPickOutcome: Codec;\n/** Placement of content within a `Box`. */\nexport type ContentAlignment = \"TopStart\" | \"TopCenter\" | \"TopEnd\" | \"CenterStart\" | \"Center\" | \"CenterEnd\" | \"BottomStart\" | \"BottomCenter\" | \"BottomEnd\";\nexport const ContentAlignment: Codec;\n/** A privacy-preserving alias derived via ring VRF, bound to a specific context. */\nexport interface ContextualAlias {\n /** 32-byte context identifier the alias is bound to. */\n context: HexString;\n /** Ring VRF alias (variable length). */\n alias: HexString;\n}\nexport const ContextualAlias: Codec;\n/**\n * Account selector within a product subtree. Encodes as\n * `Either` on the wire (`Index` = left, `Raw` = right).\n *\n * `Index` is the primary form \u2014 plain indices keep a product's accounts\n * enumerable. `Raw` carries a raw 32-byte derivation index for cases where\n * bytes are genuinely necessary. Hosts expand `Index(n)` to the internal\n * 32-byte index (`u32` little-endian plus the index magic).\n */\nexport type DerivationIndex = \n/** Plain account index. */\n{\n tag: \"Index\";\n value: number;\n}\n/** Raw 32-byte derivation index. */\n | {\n tag: \"Raw\";\n value: HexString;\n};\nexport const DerivationIndex: Codec;\n/** Edge dimensions. `bottom` defaults to `top` and `start` to `end` when absent. */\nexport interface Dimensions {\n /** Top edge. */\n top: Size;\n /** End edge. */\n end: Size;\n /** Bottom edge; defaults to `top`. */\n bottom?: Size;\n /** Start edge; defaults to `end`. */\n start?: Size;\n}\nexport const Dimensions: Codec;\n/** A visual effect. Each variant names one effect and carries its parameters. */\nexport type Effect = \"Rainbow\";\nexport const Effect: Codec;\n/** Properties of an `Effect`. */\nexport interface EffectProps {\n /** The effect applied to the children. */\n effect: Effect;\n}\nexport const EffectProps: Codec;\n/**\n * Generic error payload carrying a human-readable reason string. Used by many\n * methods as a catch-all error type.\n */\nexport interface GenericError {\n /** Human-readable failure reason. */\n reason: string;\n}\nexport const GenericError: Codec;\n/** Cross-axis alignment of `Column` children. */\nexport type HorizontalAlignment = \"Start\" | \"Center\" | \"End\";\nexport const HorizontalAlignment: Codec;\n/** Versioned envelope for [`HostAccountConnectionStatusSubscribeError`]. */\nexport type VersionedHostAccountConnectionStatusSubscribeError = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: GenericError;\n};\nexport const VersionedHostAccountConnectionStatusSubscribeError: Codec;\n/** Versioned envelope for [`HostAccountConnectionStatusSubscribeItem`]. */\nexport type VersionedHostAccountConnectionStatusSubscribeItem = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostAccountConnectionStatusSubscribeItem;\n};\nexport const VersionedHostAccountConnectionStatusSubscribeItem: Codec;\n/** Versioned envelope for [`HostAccountConnectionStatusSubscribeRequest`]. */\nexport type VersionedHostAccountConnectionStatusSubscribeRequest = \n/** Version 1 (no payload). */\n{\n tag: \"V1\";\n value?: undefined;\n};\nexport const VersionedHostAccountConnectionStatusSubscribeRequest: Codec;\n/** Versioned envelope for [`HostAccountCreateProofError`]. */\nexport type VersionedHostAccountCreateProofError = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostAccountCreateProofError;\n};\nexport const VersionedHostAccountCreateProofError: Codec;\n/** Versioned envelope for [`HostAccountCreateProofRequest`]. */\nexport type VersionedHostAccountCreateProofRequest = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostAccountCreateProofRequest;\n};\nexport const VersionedHostAccountCreateProofRequest: Codec;\n/** Versioned envelope for [`HostAccountCreateProofResponse`]. */\nexport type VersionedHostAccountCreateProofResponse = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostAccountCreateProofResponse;\n};\nexport const VersionedHostAccountCreateProofResponse: Codec;\n/** Versioned envelope for [`HostAccountGetAliasError`]. */\nexport type VersionedHostAccountGetAliasError = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostAccountGetAliasError;\n};\nexport const VersionedHostAccountGetAliasError: Codec;\n/** Versioned envelope for [`HostAccountGetAliasRequest`]. */\nexport type VersionedHostAccountGetAliasRequest = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostAccountGetAliasRequest;\n};\nexport const VersionedHostAccountGetAliasRequest: Codec;\n/** Versioned envelope for [`HostAccountGetAliasResponse`]. */\nexport type VersionedHostAccountGetAliasResponse = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: ContextualAlias;\n};\nexport const VersionedHostAccountGetAliasResponse: Codec;\n/** Versioned envelope for [`HostAccountGetError`]. */\nexport type VersionedHostAccountGetError = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostAccountGetError;\n};\nexport const VersionedHostAccountGetError: Codec;\n/** Versioned envelope for [`HostAccountGetRequest`]. */\nexport type VersionedHostAccountGetRequest = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostAccountGetRequest;\n};\nexport const VersionedHostAccountGetRequest: Codec;\n/** Versioned envelope for [`HostAccountGetResponse`]. */\nexport type VersionedHostAccountGetResponse = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostAccountGetResponse;\n};\nexport const VersionedHostAccountGetResponse: Codec;\n/** Versioned envelope for [`HostAccountListRingVrfKeysError`]. */\nexport type VersionedHostAccountListRingVrfKeysError = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostAccountListRingVrfKeysError;\n};\nexport const VersionedHostAccountListRingVrfKeysError: Codec;\n/** Versioned envelope for [`HostAccountListRingVrfKeysRequest`]. */\nexport type VersionedHostAccountListRingVrfKeysRequest = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostAccountListRingVrfKeysRequest;\n};\nexport const VersionedHostAccountListRingVrfKeysRequest: Codec;\n/** Versioned envelope for [`HostAccountListRingVrfKeysResponse`]. */\nexport type VersionedHostAccountListRingVrfKeysResponse = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: Array;\n};\nexport const VersionedHostAccountListRingVrfKeysResponse: Codec;\n/** Versioned envelope for [`HostAccountRegisterRingVrfKeyError`]. */\nexport type VersionedHostAccountRegisterRingVrfKeyError = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostAccountRegisterRingVrfKeyError;\n};\nexport const VersionedHostAccountRegisterRingVrfKeyError: Codec;\n/** Versioned envelope for [`HostAccountRegisterRingVrfKeyRequest`]. */\nexport type VersionedHostAccountRegisterRingVrfKeyRequest = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostAccountRegisterRingVrfKeyRequest;\n};\nexport const VersionedHostAccountRegisterRingVrfKeyRequest: Codec;\n/** Versioned envelope for [`HostAccountRegisterRingVrfKeyResponse`]. */\nexport type VersionedHostAccountRegisterRingVrfKeyResponse = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HexString;\n};\nexport const VersionedHostAccountRegisterRingVrfKeyResponse: Codec;\n/** Versioned envelope for [`HostAccountRingVrfSignError`]. */\nexport type VersionedHostAccountRingVrfSignError = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostAccountRingVrfSignError;\n};\nexport const VersionedHostAccountRingVrfSignError: Codec;\n/** Versioned envelope for [`HostAccountRingVrfSignRequest`]. */\nexport type VersionedHostAccountRingVrfSignRequest = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostAccountRingVrfSignRequest;\n};\nexport const VersionedHostAccountRingVrfSignRequest: Codec;\n/** Versioned envelope for [`HostAccountRingVrfSignResponse`]. */\nexport type VersionedHostAccountRingVrfSignResponse = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HexString;\n};\nexport const VersionedHostAccountRingVrfSignResponse: Codec;\n/** Versioned envelope for [`HostAccountSignVrfError`]. */\nexport type VersionedHostAccountSignVrfError = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostAccountSignVrfError;\n};\nexport const VersionedHostAccountSignVrfError: Codec;\n/** Versioned envelope for [`HostAccountSignVrfRequest`]. */\nexport type VersionedHostAccountSignVrfRequest = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostAccountSignVrfRequest;\n};\nexport const VersionedHostAccountSignVrfRequest: Codec;\n/** Versioned envelope for [`HostAccountSignVrfResponse`]. */\nexport type VersionedHostAccountSignVrfResponse = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: VrfSignature;\n};\nexport const VersionedHostAccountSignVrfResponse: Codec;\n/** Versioned envelope for [`HostChatActionSubscribeError`]. */\nexport type VersionedHostChatActionSubscribeError = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: GenericError;\n};\nexport const VersionedHostChatActionSubscribeError: Codec;\n/** Versioned envelope for [`HostChatActionSubscribeItem`]. */\nexport type VersionedHostChatActionSubscribeItem = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostChatActionSubscribeItem;\n};\nexport const VersionedHostChatActionSubscribeItem: Codec;\n/** Versioned envelope for [`HostChatActionSubscribeRequest`]. */\nexport type VersionedHostChatActionSubscribeRequest = \n/** Version 1 (no payload). */\n{\n tag: \"V1\";\n value?: undefined;\n};\nexport const VersionedHostChatActionSubscribeRequest: Codec;\n/** Versioned envelope for [`HostChatCreateRoomError`]. */\nexport type VersionedHostChatCreateRoomError = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostChatCreateRoomError;\n};\nexport const VersionedHostChatCreateRoomError: Codec;\n/** Versioned envelope for [`HostChatCreateRoomRequest`]. */\nexport type VersionedHostChatCreateRoomRequest = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostChatCreateRoomRequest;\n};\nexport const VersionedHostChatCreateRoomRequest: Codec;\n/** Versioned envelope for [`HostChatCreateRoomResponse`]. */\nexport type VersionedHostChatCreateRoomResponse = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostChatCreateRoomResponse;\n};\nexport const VersionedHostChatCreateRoomResponse: Codec;\n/** Versioned envelope for [`HostChatListSubscribeError`]. */\nexport type VersionedHostChatListSubscribeError = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: GenericError;\n};\nexport const VersionedHostChatListSubscribeError: Codec;\n/** Versioned envelope for [`HostChatListSubscribeItem`]. */\nexport type VersionedHostChatListSubscribeItem = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostChatListSubscribeItem;\n};\nexport const VersionedHostChatListSubscribeItem: Codec;\n/** Versioned envelope for [`HostChatListSubscribeRequest`]. */\nexport type VersionedHostChatListSubscribeRequest = \n/** Version 1 (no payload). */\n{\n tag: \"V1\";\n value?: undefined;\n};\nexport const VersionedHostChatListSubscribeRequest: Codec;\n/** Versioned envelope for [`HostChatPostMessageError`]. */\nexport type VersionedHostChatPostMessageError = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostChatPostMessageError;\n};\nexport const VersionedHostChatPostMessageError: Codec;\n/** Versioned envelope for [`HostChatPostMessageRequest`]. */\nexport type VersionedHostChatPostMessageRequest = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostChatPostMessageRequest;\n};\nexport const VersionedHostChatPostMessageRequest: Codec;\n/** Versioned envelope for [`HostChatPostMessageResponse`]. */\nexport type VersionedHostChatPostMessageResponse = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostChatPostMessageResponse;\n};\nexport const VersionedHostChatPostMessageResponse: Codec;\n/** Versioned envelope for [`HostChatRegisterBotError`]. */\nexport type VersionedHostChatRegisterBotError = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostChatRegisterBotError;\n};\nexport const VersionedHostChatRegisterBotError: Codec;\n/** Versioned envelope for [`HostChatRegisterBotRequest`]. */\nexport type VersionedHostChatRegisterBotRequest = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostChatRegisterBotRequest;\n};\nexport const VersionedHostChatRegisterBotRequest: Codec;\n/** Versioned envelope for [`HostChatRegisterBotResponse`]. */\nexport type VersionedHostChatRegisterBotResponse = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostChatRegisterBotResponse;\n};\nexport const VersionedHostChatRegisterBotResponse: Codec;\n/** Versioned envelope for [`HostCoinPaymentCreateChequeError`]. */\nexport type VersionedHostCoinPaymentCreateChequeError = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: CoinPaymentError;\n};\nexport const VersionedHostCoinPaymentCreateChequeError: Codec;\n/** Versioned envelope for [`HostCoinPaymentCreateChequeRequest`]. */\nexport type VersionedHostCoinPaymentCreateChequeRequest = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostCoinPaymentCreateChequeRequest;\n};\nexport const VersionedHostCoinPaymentCreateChequeRequest: Codec;\n/** Versioned envelope for [`HostCoinPaymentCreateChequeResponse`]. */\nexport type VersionedHostCoinPaymentCreateChequeResponse = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostCoinPaymentCreateChequeResponse;\n};\nexport const VersionedHostCoinPaymentCreateChequeResponse: Codec;\n/** Versioned envelope for [`HostCoinPaymentCreatePurseError`]. */\nexport type VersionedHostCoinPaymentCreatePurseError = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: CoinPaymentError;\n};\nexport const VersionedHostCoinPaymentCreatePurseError: Codec;\n/** Versioned envelope for [`HostCoinPaymentCreatePurseRequest`]. */\nexport type VersionedHostCoinPaymentCreatePurseRequest = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostCoinPaymentCreatePurseRequest;\n};\nexport const VersionedHostCoinPaymentCreatePurseRequest: Codec;\n/** Versioned envelope for [`HostCoinPaymentCreatePurseResponse`]. */\nexport type VersionedHostCoinPaymentCreatePurseResponse = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostCoinPaymentCreatePurseResponse;\n};\nexport const VersionedHostCoinPaymentCreatePurseResponse: Codec;\n/** Versioned envelope for [`HostCoinPaymentCreateReceivableError`]. */\nexport type VersionedHostCoinPaymentCreateReceivableError = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: CoinPaymentError;\n};\nexport const VersionedHostCoinPaymentCreateReceivableError: Codec;\n/** Versioned envelope for [`HostCoinPaymentCreateReceivableRequest`]. */\nexport type VersionedHostCoinPaymentCreateReceivableRequest = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostCoinPaymentCreateReceivableRequest;\n};\nexport const VersionedHostCoinPaymentCreateReceivableRequest: Codec;\n/** Versioned envelope for [`HostCoinPaymentCreateReceivableResponse`]. */\nexport type VersionedHostCoinPaymentCreateReceivableResponse = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostCoinPaymentCreateReceivableResponse;\n};\nexport const VersionedHostCoinPaymentCreateReceivableResponse: Codec;\n/** Versioned envelope for [`HostCoinPaymentDeletePurseError`]. */\nexport type VersionedHostCoinPaymentDeletePurseError = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: CoinPaymentError;\n};\nexport const VersionedHostCoinPaymentDeletePurseError: Codec;\n/** Versioned envelope for [`HostCoinPaymentDeletePurseItem`]. */\nexport type VersionedHostCoinPaymentDeletePurseItem = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: CoinPaymentStatus;\n};\nexport const VersionedHostCoinPaymentDeletePurseItem: Codec;\n/** Versioned envelope for [`HostCoinPaymentDeletePurseRequest`]. */\nexport type VersionedHostCoinPaymentDeletePurseRequest = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostCoinPaymentDeletePurseRequest;\n};\nexport const VersionedHostCoinPaymentDeletePurseRequest: Codec;\n/** Versioned envelope for [`HostCoinPaymentDepositError`]. */\nexport type VersionedHostCoinPaymentDepositError = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: CoinPaymentError;\n};\nexport const VersionedHostCoinPaymentDepositError: Codec;\n/** Versioned envelope for [`HostCoinPaymentDepositItem`]. */\nexport type VersionedHostCoinPaymentDepositItem = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: CoinPaymentStatus;\n};\nexport const VersionedHostCoinPaymentDepositItem: Codec;\n/** Versioned envelope for [`HostCoinPaymentDepositRequest`]. */\nexport type VersionedHostCoinPaymentDepositRequest = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostCoinPaymentDepositRequest;\n};\nexport const VersionedHostCoinPaymentDepositRequest: Codec;\n/** Versioned envelope for [`HostCoinPaymentListenForError`]. */\nexport type VersionedHostCoinPaymentListenForError = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: CoinPaymentError;\n};\nexport const VersionedHostCoinPaymentListenForError: Codec;\n/** Versioned envelope for [`HostCoinPaymentListenForItem`]. */\nexport type VersionedHostCoinPaymentListenForItem = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostCoinPaymentListenForItem;\n};\nexport const VersionedHostCoinPaymentListenForItem: Codec;\n/** Versioned envelope for [`HostCoinPaymentListenForRequest`]. */\nexport type VersionedHostCoinPaymentListenForRequest = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostCoinPaymentListenForRequest;\n};\nexport const VersionedHostCoinPaymentListenForRequest: Codec;\n/** Versioned envelope for [`HostCoinPaymentQueryPurseError`]. */\nexport type VersionedHostCoinPaymentQueryPurseError = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: CoinPaymentError;\n};\nexport const VersionedHostCoinPaymentQueryPurseError: Codec;\n/** Versioned envelope for [`HostCoinPaymentQueryPurseRequest`]. */\nexport type VersionedHostCoinPaymentQueryPurseRequest = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostCoinPaymentQueryPurseRequest;\n};\nexport const VersionedHostCoinPaymentQueryPurseRequest: Codec;\n/** Versioned envelope for [`HostCoinPaymentQueryPurseResponse`]. */\nexport type VersionedHostCoinPaymentQueryPurseResponse = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostCoinPaymentQueryPurseResponse;\n};\nexport const VersionedHostCoinPaymentQueryPurseResponse: Codec;\n/** Versioned envelope for [`HostCoinPaymentRebalancePurseError`]. */\nexport type VersionedHostCoinPaymentRebalancePurseError = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: CoinPaymentError;\n};\nexport const VersionedHostCoinPaymentRebalancePurseError: Codec;\n/** Versioned envelope for [`HostCoinPaymentRebalancePurseItem`]. */\nexport type VersionedHostCoinPaymentRebalancePurseItem = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: CoinPaymentStatus;\n};\nexport const VersionedHostCoinPaymentRebalancePurseItem: Codec;\n/** Versioned envelope for [`HostCoinPaymentRebalancePurseRequest`]. */\nexport type VersionedHostCoinPaymentRebalancePurseRequest = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostCoinPaymentRebalancePurseRequest;\n};\nexport const VersionedHostCoinPaymentRebalancePurseRequest: Codec;\n/** Versioned envelope for [`HostCoinPaymentRefundError`]. */\nexport type VersionedHostCoinPaymentRefundError = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: CoinPaymentError;\n};\nexport const VersionedHostCoinPaymentRefundError: Codec;\n/** Versioned envelope for [`HostCoinPaymentRefundItem`]. */\nexport type VersionedHostCoinPaymentRefundItem = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: CoinPaymentStatus;\n};\nexport const VersionedHostCoinPaymentRefundItem: Codec;\n/** Versioned envelope for [`HostCoinPaymentRefundRequest`]. */\nexport type VersionedHostCoinPaymentRefundRequest = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostCoinPaymentRefundRequest;\n};\nexport const VersionedHostCoinPaymentRefundRequest: Codec;\n/** Versioned envelope for [`HostContactsPickError`]. */\nexport type VersionedHostContactsPickError = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostContactsPickError;\n};\nexport const VersionedHostContactsPickError: Codec;\n/** Versioned envelope for [`HostContactsPickRequest`]. */\nexport type VersionedHostContactsPickRequest = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostContactsPickRequest;\n};\nexport const VersionedHostContactsPickRequest: Codec;\n/** Versioned envelope for [`HostContactsPickResponse`]. */\nexport type VersionedHostContactsPickResponse = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostContactsPickResponse;\n};\nexport const VersionedHostContactsPickResponse: Codec;\n/** Versioned envelope for [`HostCreateTransactionError`]. */\nexport type VersionedHostCreateTransactionError = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostCreateTransactionError;\n};\nexport const VersionedHostCreateTransactionError: Codec;\n/** Versioned envelope for [`HostCreateTransactionRequest`]. */\nexport type VersionedHostCreateTransactionRequest = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: ProductAccountTxPayload;\n};\nexport const VersionedHostCreateTransactionRequest: Codec;\n/** Versioned envelope for [`HostCreateTransactionResponse`]. */\nexport type VersionedHostCreateTransactionResponse = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostCreateTransactionResponse;\n};\nexport const VersionedHostCreateTransactionResponse: Codec;\n/** Versioned envelope for [`HostCreateTransactionWithLegacyAccountError`]. */\nexport type VersionedHostCreateTransactionWithLegacyAccountError = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostCreateTransactionError;\n};\nexport const VersionedHostCreateTransactionWithLegacyAccountError: Codec;\n/** Versioned envelope for [`HostCreateTransactionWithLegacyAccountRequest`]. */\nexport type VersionedHostCreateTransactionWithLegacyAccountRequest = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: LegacyAccountTxPayload;\n};\nexport const VersionedHostCreateTransactionWithLegacyAccountRequest: Codec;\n/** Versioned envelope for [`HostCreateTransactionWithLegacyAccountResponse`]. */\nexport type VersionedHostCreateTransactionWithLegacyAccountResponse = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostCreateTransactionWithLegacyAccountResponse;\n};\nexport const VersionedHostCreateTransactionWithLegacyAccountResponse: Codec;\n/** Versioned envelope for [`HostDeriveEntropyError`]. */\nexport type VersionedHostDeriveEntropyError = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostDeriveEntropyError;\n};\nexport const VersionedHostDeriveEntropyError: Codec;\n/** Versioned envelope for [`HostDeriveEntropyRequest`]. */\nexport type VersionedHostDeriveEntropyRequest = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostDeriveEntropyRequest;\n};\nexport const VersionedHostDeriveEntropyRequest: Codec;\n/** Versioned envelope for [`HostDeriveEntropyResponse`]. */\nexport type VersionedHostDeriveEntropyResponse = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostDeriveEntropyResponse;\n};\nexport const VersionedHostDeriveEntropyResponse: Codec;\n/** Versioned envelope for [`HostDevicePermissionError`]. */\nexport type VersionedHostDevicePermissionError = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: GenericError;\n};\nexport const VersionedHostDevicePermissionError: Codec;\n/** Versioned envelope for [`HostDevicePermissionRequest`]. */\nexport type VersionedHostDevicePermissionRequest = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostDevicePermissionRequest;\n};\nexport const VersionedHostDevicePermissionRequest: Codec;\n/** Versioned envelope for [`HostDevicePermissionResponse`]. */\nexport type VersionedHostDevicePermissionResponse = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostDevicePermissionResponse;\n};\nexport const VersionedHostDevicePermissionResponse: Codec;\n/** Versioned envelope for [`HostFeatureSupportedError`]. */\nexport type VersionedHostFeatureSupportedError = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: GenericError;\n};\nexport const VersionedHostFeatureSupportedError: Codec;\n/** Versioned envelope for [`HostFeatureSupportedRequest`]. */\nexport type VersionedHostFeatureSupportedRequest = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostFeatureSupportedRequest;\n};\nexport const VersionedHostFeatureSupportedRequest: Codec;\n/** Versioned envelope for [`HostFeatureSupportedResponse`]. */\nexport type VersionedHostFeatureSupportedResponse = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostFeatureSupportedResponse;\n};\nexport const VersionedHostFeatureSupportedResponse: Codec;\n/** Versioned envelope for [`HostGetLegacyAccountsError`]. */\nexport type VersionedHostGetLegacyAccountsError = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostAccountGetError;\n};\nexport const VersionedHostGetLegacyAccountsError: Codec;\n/** Versioned envelope for [`HostGetLegacyAccountsRequest`]. */\nexport type VersionedHostGetLegacyAccountsRequest = \n/** Version 1 (no payload). */\n{\n tag: \"V1\";\n value?: undefined;\n};\nexport const VersionedHostGetLegacyAccountsRequest: Codec;\n/** Versioned envelope for [`HostGetLegacyAccountsResponse`]. */\nexport type VersionedHostGetLegacyAccountsResponse = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostGetLegacyAccountsResponse;\n};\nexport const VersionedHostGetLegacyAccountsResponse: Codec;\n/** Versioned envelope for [`HostGetProductContextError`]. */\nexport type VersionedHostGetProductContextError = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: GenericError;\n};\nexport const VersionedHostGetProductContextError: Codec;\n/** Versioned envelope for [`HostGetProductContextRequest`]. */\nexport type VersionedHostGetProductContextRequest = \n/** Version 1 (no payload). */\n{\n tag: \"V1\";\n value?: undefined;\n};\nexport const VersionedHostGetProductContextRequest: Codec;\n/** Versioned envelope for [`HostGetProductContextResponse`]. */\nexport type VersionedHostGetProductContextResponse = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostGetProductContextResponse;\n};\nexport const VersionedHostGetProductContextResponse: Codec;\n/** Versioned envelope for [`HostGetUserIdError`]. */\nexport type VersionedHostGetUserIdError = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostGetUserIdError;\n};\nexport const VersionedHostGetUserIdError: Codec;\n/** Versioned envelope for [`HostGetUserIdRequest`]. */\nexport type VersionedHostGetUserIdRequest = \n/** Version 1 (no payload). */\n{\n tag: \"V1\";\n value?: undefined;\n};\nexport const VersionedHostGetUserIdRequest: Codec;\n/** Versioned envelope for [`HostGetUserIdResponse`]. */\nexport type VersionedHostGetUserIdResponse = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostGetUserIdResponse;\n};\nexport const VersionedHostGetUserIdResponse: Codec;\n/** Versioned envelope for [`HostHandshakeError`]. */\nexport type VersionedHostHandshakeError = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostHandshakeError;\n};\nexport const VersionedHostHandshakeError: Codec;\n/** Versioned envelope for [`HostHandshakeRequest`]. */\nexport type VersionedHostHandshakeRequest = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostHandshakeRequest;\n};\nexport const VersionedHostHandshakeRequest: Codec;\n/** Versioned envelope for [`HostHandshakeResponse`]. */\nexport type VersionedHostHandshakeResponse = \n/** Version 1 (no payload). */\n{\n tag: \"V1\";\n value?: undefined;\n};\nexport const VersionedHostHandshakeResponse: Codec;\n/**\n * Identity and version of the host currently running the product.\n *\n * Reported by [`crate::api::System::host_info`] so a product knows which host\n * (and which build of it) is running it \u2014 for adapting to the host,\n * telemetry, and attributing behaviour to a concrete build in diagnostics and\n * bug reports.\n */\nexport interface HostInfo {\n /** Platform category the host runs on. */\n platform: HostPlatform;\n /**\n * Human-readable name of the host implementation, e.g. `\"Polkadot\n * Desktop\"`, `\"Polkadot Mobile\"`, or `\"dotli\"`. Hosts should report a\n * stable, non-empty name.\n */\n name: string;\n /**\n * Host-native version string, e.g. a semver such as `\"1.2.3\"`. Hosts\n * should report a non-empty value; the format is the host's own.\n */\n version: string;\n}\nexport const HostInfo: Codec;\n/** Versioned envelope for [`HostInfoError`]. */\nexport type VersionedHostInfoError = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: GenericError;\n};\nexport const VersionedHostInfoError: Codec;\n/** Versioned envelope for [`HostInfoRequest`]. */\nexport type VersionedHostInfoRequest = \n/** Version 1 (no payload). */\n{\n tag: \"V1\";\n value?: undefined;\n};\nexport const VersionedHostInfoRequest: Codec;\n/** Versioned envelope for [`HostInfoResponse`]. */\nexport type VersionedHostInfoResponse = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostInfo;\n};\nexport const VersionedHostInfoResponse: Codec;\n/** Versioned envelope for [`HostLocalStorageChangeItem`]. */\nexport type VersionedHostLocalStorageChangeItem = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostLocalStorageChangeItem;\n};\nexport const VersionedHostLocalStorageChangeItem: Codec;\n/** Versioned envelope for [`HostLocalStorageClearError`]. */\nexport type VersionedHostLocalStorageClearError = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: V01HostLocalStorageReadError;\n};\nexport const VersionedHostLocalStorageClearError: Codec;\n/** Versioned envelope for [`HostLocalStorageClearRequest`]. */\nexport type VersionedHostLocalStorageClearRequest = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostLocalStorageClearRequest;\n};\nexport const VersionedHostLocalStorageClearRequest: Codec;\n/** Versioned envelope for [`HostLocalStorageClearResponse`]. */\nexport type VersionedHostLocalStorageClearResponse = \n/** Version 1 (no payload). */\n{\n tag: \"V1\";\n value?: undefined;\n};\nexport const VersionedHostLocalStorageClearResponse: Codec;\n/** Versioned envelope for [`HostLocalStorageReadError`]. */\nexport type VersionedHostLocalStorageReadError = \n/** Version 2 payload. */\n{\n tag: \"V2\";\n value: HostLocalStorageReadError;\n};\nexport const VersionedHostLocalStorageReadError: Codec;\n/** Versioned envelope for [`HostLocalStorageReadRequest`]. */\nexport type VersionedHostLocalStorageReadRequest = \n/** Version 2 payload. */\n{\n tag: \"V2\";\n value: HostLocalStorageReadRequest;\n};\nexport const VersionedHostLocalStorageReadRequest: Codec;\n/** Versioned envelope for [`HostLocalStorageReadResponse`]. */\nexport type VersionedHostLocalStorageReadResponse = \n/** Version 2 payload. */\n{\n tag: \"V2\";\n value: HostLocalStorageReadResponse;\n};\nexport const VersionedHostLocalStorageReadResponse: Codec;\n/** Versioned envelope for [`HostLocalStorageSubscribeError`]. */\nexport type VersionedHostLocalStorageSubscribeError = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: GenericError;\n};\nexport const VersionedHostLocalStorageSubscribeError: Codec;\n/** Versioned envelope for [`HostLocalStorageSubscribeRequest`]. */\nexport type VersionedHostLocalStorageSubscribeRequest = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostLocalStorageSubscribeRequest;\n};\nexport const VersionedHostLocalStorageSubscribeRequest: Codec;\n/** Versioned envelope for [`HostLocalStorageWriteError`]. */\nexport type VersionedHostLocalStorageWriteError = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: V01HostLocalStorageReadError;\n};\nexport const VersionedHostLocalStorageWriteError: Codec;\n/** Versioned envelope for [`HostLocalStorageWriteRequest`]. */\nexport type VersionedHostLocalStorageWriteRequest = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostLocalStorageWriteRequest;\n};\nexport const VersionedHostLocalStorageWriteRequest: Codec;\n/** Versioned envelope for [`HostLocalStorageWriteResponse`]. */\nexport type VersionedHostLocalStorageWriteResponse = \n/** Version 1 (no payload). */\n{\n tag: \"V1\";\n value?: undefined;\n};\nexport const VersionedHostLocalStorageWriteResponse: Codec;\n/** Versioned envelope for [`HostLocaleLocalizeTimestampsError`]. */\nexport type VersionedHostLocaleLocalizeTimestampsError = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: GenericError;\n};\nexport const VersionedHostLocaleLocalizeTimestampsError: Codec;\n/** Versioned envelope for [`HostLocaleLocalizeTimestampsRequest`]. */\nexport type VersionedHostLocaleLocalizeTimestampsRequest = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostLocaleLocalizeTimestampsRequest;\n};\nexport const VersionedHostLocaleLocalizeTimestampsRequest: Codec;\n/** Versioned envelope for [`HostLocaleLocalizeTimestampsResponse`]. */\nexport type VersionedHostLocaleLocalizeTimestampsResponse = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostLocaleLocalizeTimestampsResponse;\n};\nexport const VersionedHostLocaleLocalizeTimestampsResponse: Codec;\n/** One timestamp's calendar identity and presentation in the requested context. */\nexport interface HostLocaleLocalizedTimestamp {\n /** Gregorian YYYY-MM-DD local date, independent of display language/calendar. */\n localDate: string;\n /** Localized short time, including the host language's hour-cycle convention. */\n time: string;\n /** Localized date label. */\n date: string;\n /** Localized date and time with a time-zone indication for detail views. */\n dateTime: string;\n}\nexport const HostLocaleLocalizedTimestamp: Codec;\n/** Versioned envelope for [`HostLocaleSubscribeError`]. */\nexport type VersionedHostLocaleSubscribeError = \n/** Version 2 payload. */\n{\n tag: \"V2\";\n value: GenericError;\n};\nexport const VersionedHostLocaleSubscribeError: Codec;\n/** Versioned envelope for [`HostLocaleSubscribeItem`]. */\nexport type VersionedHostLocaleSubscribeItem = \n/** Version 2 payload. */\n{\n tag: \"V2\";\n value: HostLocaleSubscribeItem;\n};\nexport const VersionedHostLocaleSubscribeItem: Codec;\n/** Versioned envelope for [`HostLocaleSubscribeRequest`]. */\nexport type VersionedHostLocaleSubscribeRequest = \n/** Version 2 (no payload). */\n{\n tag: \"V2\";\n value?: undefined;\n};\nexport const VersionedHostLocaleSubscribeRequest: Codec;\n/** Versioned envelope for [`HostNavigateToError`]. */\nexport type VersionedHostNavigateToError = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostNavigateToError;\n};\nexport const VersionedHostNavigateToError: Codec;\n/** Versioned envelope for [`HostNavigateToRequest`]. */\nexport type VersionedHostNavigateToRequest = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostNavigateToRequest;\n};\nexport const VersionedHostNavigateToRequest: Codec;\n/** Versioned envelope for [`HostNavigateToResponse`]. */\nexport type VersionedHostNavigateToResponse = \n/** Version 1 (no payload). */\n{\n tag: \"V1\";\n value?: undefined;\n};\nexport const VersionedHostNavigateToResponse: Codec;\n/** Versioned envelope for [`HostPaymentBalanceSubscribeError`]. */\nexport type VersionedHostPaymentBalanceSubscribeError = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostPaymentBalanceSubscribeError;\n};\nexport const VersionedHostPaymentBalanceSubscribeError: Codec;\n/** Versioned envelope for [`HostPaymentBalanceSubscribeItem`]. */\nexport type VersionedHostPaymentBalanceSubscribeItem = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostPaymentBalanceSubscribeItem;\n};\nexport const VersionedHostPaymentBalanceSubscribeItem: Codec;\n/** Versioned envelope for [`HostPaymentBalanceSubscribeRequest`]. */\nexport type VersionedHostPaymentBalanceSubscribeRequest = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostPaymentBalanceSubscribeRequest;\n};\nexport const VersionedHostPaymentBalanceSubscribeRequest: Codec;\n/** Versioned envelope for [`HostPaymentError`]. */\nexport type VersionedHostPaymentError = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostPaymentError;\n};\nexport const VersionedHostPaymentError: Codec;\n/** Versioned envelope for [`HostPaymentRequest`]. */\nexport type VersionedHostPaymentRequest = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostPaymentRequest;\n};\nexport const VersionedHostPaymentRequest: Codec;\n/** Versioned envelope for [`HostPaymentResponse`]. */\nexport type VersionedHostPaymentResponse = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostPaymentResponse;\n};\nexport const VersionedHostPaymentResponse: Codec;\n/** Versioned envelope for [`HostPaymentStatusSubscribeError`]. */\nexport type VersionedHostPaymentStatusSubscribeError = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostPaymentStatusSubscribeError;\n};\nexport const VersionedHostPaymentStatusSubscribeError: Codec;\n/** Versioned envelope for [`HostPaymentStatusSubscribeItem`]. */\nexport type VersionedHostPaymentStatusSubscribeItem = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostPaymentStatusSubscribeItem;\n};\nexport const VersionedHostPaymentStatusSubscribeItem: Codec;\n/** Versioned envelope for [`HostPaymentStatusSubscribeRequest`]. */\nexport type VersionedHostPaymentStatusSubscribeRequest = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostPaymentStatusSubscribeRequest;\n};\nexport const VersionedHostPaymentStatusSubscribeRequest: Codec;\n/** Versioned envelope for [`HostPaymentTopUpError`]. */\nexport type VersionedHostPaymentTopUpError = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostPaymentTopUpError;\n};\nexport const VersionedHostPaymentTopUpError: Codec;\n/** Versioned envelope for [`HostPaymentTopUpRequest`]. */\nexport type VersionedHostPaymentTopUpRequest = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostPaymentTopUpRequest;\n};\nexport const VersionedHostPaymentTopUpRequest: Codec;\n/** Versioned envelope for [`HostPaymentTopUpResponse`]. */\nexport type VersionedHostPaymentTopUpResponse = \n/** Version 1 (no payload). */\n{\n tag: \"V1\";\n value?: undefined;\n};\nexport const VersionedHostPaymentTopUpResponse: Codec;\n/** Platform category a host runs on. */\nexport type HostPlatform = \"Web\" | \"Android\" | \"Ios\" | \"Desktop\" | \"Cli\" | \"Unknown\";\nexport const HostPlatform: Codec;\n/** Versioned envelope for [`HostPocketListSubscribeError`]. */\nexport type VersionedHostPocketListSubscribeError = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: GenericError;\n};\nexport const VersionedHostPocketListSubscribeError: Codec;\n/** Versioned envelope for [`HostPocketListSubscribeItem`]. */\nexport type VersionedHostPocketListSubscribeItem = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostPocketListSubscribeItem;\n};\nexport const VersionedHostPocketListSubscribeItem: Codec;\n/** Versioned envelope for [`HostPocketListSubscribeRequest`]. */\nexport type VersionedHostPocketListSubscribeRequest = \n/** Version 1 (no payload). */\n{\n tag: \"V1\";\n value?: undefined;\n};\nexport const VersionedHostPocketListSubscribeRequest: Codec;\n/** Versioned envelope for [`HostPocketRemoveCardError`]. */\nexport type VersionedHostPocketRemoveCardError = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostPocketRemoveCardError;\n};\nexport const VersionedHostPocketRemoveCardError: Codec;\n/** Versioned envelope for [`HostPocketRemoveCardRequest`]. */\nexport type VersionedHostPocketRemoveCardRequest = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostPocketRemoveCardRequest;\n};\nexport const VersionedHostPocketRemoveCardRequest: Codec;\n/** Versioned envelope for [`HostPocketRemoveCardResponse`]. */\nexport type VersionedHostPocketRemoveCardResponse = \n/** Version 1 (no payload). */\n{\n tag: \"V1\";\n value?: undefined;\n};\nexport const VersionedHostPocketRemoveCardResponse: Codec;\n/** Versioned envelope for [`HostPushNotificationCancelError`]. */\nexport type VersionedHostPushNotificationCancelError = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: GenericError;\n};\nexport const VersionedHostPushNotificationCancelError: Codec;\n/** Versioned envelope for [`HostPushNotificationCancelRequest`]. */\nexport type VersionedHostPushNotificationCancelRequest = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostPushNotificationCancelRequest;\n};\nexport const VersionedHostPushNotificationCancelRequest: Codec;\n/** Versioned envelope for [`HostPushNotificationCancelResponse`]. */\nexport type VersionedHostPushNotificationCancelResponse = \n/** Version 1 (no payload). */\n{\n tag: \"V1\";\n value?: undefined;\n};\nexport const VersionedHostPushNotificationCancelResponse: Codec;\n/** Versioned envelope for [`HostPushNotificationError`]. */\nexport type VersionedHostPushNotificationError = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostPushNotificationError;\n};\nexport const VersionedHostPushNotificationError: Codec;\n/** Versioned envelope for [`HostPushNotificationRequest`]. */\nexport type VersionedHostPushNotificationRequest = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostPushNotificationRequest;\n};\nexport const VersionedHostPushNotificationRequest: Codec;\n/** Versioned envelope for [`HostPushNotificationResponse`]. */\nexport type VersionedHostPushNotificationResponse = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostPushNotificationResponse;\n};\nexport const VersionedHostPushNotificationResponse: Codec;\n/** Versioned envelope for [`HostRendererActionSubscribeError`]. */\nexport type VersionedHostRendererActionSubscribeError = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: GenericError;\n};\nexport const VersionedHostRendererActionSubscribeError: Codec;\n/** Versioned envelope for [`HostRendererActionSubscribeItem`]. */\nexport type VersionedHostRendererActionSubscribeItem = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostRendererActionSubscribeItem;\n};\nexport const VersionedHostRendererActionSubscribeItem: Codec;\n/** Versioned envelope for [`HostRendererActionSubscribeRequest`]. */\nexport type VersionedHostRendererActionSubscribeRequest = \n/** Version 1 (no payload). */\n{\n tag: \"V1\";\n value?: undefined;\n};\nexport const VersionedHostRendererActionSubscribeRequest: Codec;\n/** Versioned envelope for [`HostRequestLoginError`]. */\nexport type VersionedHostRequestLoginError = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostRequestLoginError;\n};\nexport const VersionedHostRequestLoginError: Codec;\n/** Versioned envelope for [`HostRequestLoginRequest`]. */\nexport type VersionedHostRequestLoginRequest = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostRequestLoginRequest;\n};\nexport const VersionedHostRequestLoginRequest: Codec;\n/** Versioned envelope for [`HostRequestLoginResponse`]. */\nexport type VersionedHostRequestLoginResponse = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostRequestLoginResponse;\n};\nexport const VersionedHostRequestLoginResponse: Codec;\n/** Versioned envelope for [`HostRequestResourceAllocationError`]. */\nexport type VersionedHostRequestResourceAllocationError = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: ResourceAllocationError;\n};\nexport const VersionedHostRequestResourceAllocationError: Codec;\n/** Versioned envelope for [`HostRequestResourceAllocationRequest`]. */\nexport type VersionedHostRequestResourceAllocationRequest = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostRequestResourceAllocationRequest;\n};\nexport const VersionedHostRequestResourceAllocationRequest: Codec;\n/** Versioned envelope for [`HostRequestResourceAllocationResponse`]. */\nexport type VersionedHostRequestResourceAllocationResponse = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostRequestResourceAllocationResponse;\n};\nexport const VersionedHostRequestResourceAllocationResponse: Codec;\n/**\n * Full Substrate extrinsic signing payload with all fields needed for signature\n * generation.\n */\nexport interface HostSignPayloadData {\n /** Reference block hash. */\n blockHash: HexString;\n /** Reference block number. */\n blockNumber: HexString;\n /** Mortality era encoding. */\n era: HexString;\n /** Chain genesis hash. */\n genesisHash: HexString;\n /** SCALE-encoded call data. */\n method: HexString;\n /** Account nonce. */\n nonce: HexString;\n /** Runtime spec version. */\n specVersion: HexString;\n /** Transaction tip. */\n tip: HexString;\n /** Transaction format version. */\n transactionVersion: HexString;\n /** Extension identifiers. */\n signedExtensions: Array;\n /** Extrinsic version. */\n version: number;\n /** For multi-asset tips. */\n assetId?: HexString;\n /** CheckMetadataHash extension. */\n metadataHash?: HexString;\n /** Metadata mode. */\n mode?: number;\n /** Request signed transaction back, encoded as one byte: absent, true, or false. */\n withSignedTransaction?: boolean;\n}\nexport const HostSignPayloadData: Codec;\n/** Versioned envelope for [`HostSignPayloadError`]. */\nexport type VersionedHostSignPayloadError = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostSignPayloadError;\n};\nexport const VersionedHostSignPayloadError: Codec;\n/** Versioned envelope for [`HostSignPayloadRequest`]. */\nexport type VersionedHostSignPayloadRequest = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostSignPayloadRequest;\n};\nexport const VersionedHostSignPayloadRequest: Codec;\n/** Versioned envelope for [`HostSignPayloadResponse`]. */\nexport type VersionedHostSignPayloadResponse = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostSignPayloadResponse;\n};\nexport const VersionedHostSignPayloadResponse: Codec;\n/** Versioned envelope for [`HostSignPayloadWithLegacyAccountError`]. */\nexport type VersionedHostSignPayloadWithLegacyAccountError = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostSignPayloadError;\n};\nexport const VersionedHostSignPayloadWithLegacyAccountError: Codec;\n/** Versioned envelope for [`HostSignPayloadWithLegacyAccountRequest`]. */\nexport type VersionedHostSignPayloadWithLegacyAccountRequest = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostSignPayloadWithLegacyAccountRequest;\n};\nexport const VersionedHostSignPayloadWithLegacyAccountRequest: Codec;\n/** Versioned envelope for [`HostSignPayloadWithLegacyAccountResponse`]. */\nexport type VersionedHostSignPayloadWithLegacyAccountResponse = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostSignPayloadResponse;\n};\nexport const VersionedHostSignPayloadWithLegacyAccountResponse: Codec;\n/** Versioned envelope for [`HostSignRawError`]. */\nexport type VersionedHostSignRawError = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostSignPayloadError;\n};\nexport const VersionedHostSignRawError: Codec;\n/** Versioned envelope for [`HostSignRawRequest`]. */\nexport type VersionedHostSignRawRequest = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostSignRawRequest;\n};\nexport const VersionedHostSignRawRequest: Codec;\n/** Versioned envelope for [`HostSignRawResponse`]. */\nexport type VersionedHostSignRawResponse = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostSignPayloadResponse;\n};\nexport const VersionedHostSignRawResponse: Codec;\n/** Versioned envelope for [`HostSignRawWithLegacyAccountError`]. */\nexport type VersionedHostSignRawWithLegacyAccountError = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostSignPayloadError;\n};\nexport const VersionedHostSignRawWithLegacyAccountError: Codec;\n/** Versioned envelope for [`HostSignRawWithLegacyAccountRequest`]. */\nexport type VersionedHostSignRawWithLegacyAccountRequest = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostSignRawWithLegacyAccountRequest;\n};\nexport const VersionedHostSignRawWithLegacyAccountRequest: Codec;\n/** Versioned envelope for [`HostSignRawWithLegacyAccountResponse`]. */\nexport type VersionedHostSignRawWithLegacyAccountResponse = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostSignPayloadResponse;\n};\nexport const VersionedHostSignRawWithLegacyAccountResponse: Codec;\n/** Versioned envelope for [`HostThemeSubscribeError`]. */\nexport type VersionedHostThemeSubscribeError = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: GenericError;\n};\nexport const VersionedHostThemeSubscribeError: Codec;\n/** Versioned envelope for [`HostThemeSubscribeItem`]. */\nexport type VersionedHostThemeSubscribeItem = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostThemeSubscribeItem;\n};\nexport const VersionedHostThemeSubscribeItem: Codec;\n/** Versioned envelope for [`HostThemeSubscribeRequest`]. */\nexport type VersionedHostThemeSubscribeRequest = \n/** Version 1 (no payload). */\n{\n tag: \"V1\";\n value?: undefined;\n};\nexport const VersionedHostThemeSubscribeRequest: Codec;\n/** Versioned envelope for [`HostWorkerBeginOperationError`]. */\nexport type VersionedHostWorkerBeginOperationError = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostWorkerOperationError;\n};\nexport const VersionedHostWorkerBeginOperationError: Codec;\n/** Versioned envelope for [`HostWorkerBeginOperationRequest`]. */\nexport type VersionedHostWorkerBeginOperationRequest = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostWorkerBeginOperationRequest;\n};\nexport const VersionedHostWorkerBeginOperationRequest: Codec;\n/** Versioned envelope for [`HostWorkerBeginOperationResponse`]. */\nexport type VersionedHostWorkerBeginOperationResponse = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostWorkerBeginOperationResponse;\n};\nexport const VersionedHostWorkerBeginOperationResponse: Codec;\n/** Versioned envelope for [`HostWorkerEndOperationError`]. */\nexport type VersionedHostWorkerEndOperationError = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostWorkerOperationError;\n};\nexport const VersionedHostWorkerEndOperationError: Codec;\n/** Versioned envelope for [`HostWorkerEndOperationRequest`]. */\nexport type VersionedHostWorkerEndOperationRequest = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostWorkerEndOperationRequest;\n};\nexport const VersionedHostWorkerEndOperationRequest: Codec;\n/** Versioned envelope for [`HostWorkerEndOperationResponse`]. */\nexport type VersionedHostWorkerEndOperationResponse = \n/** Version 1 (no payload). */\n{\n tag: \"V1\";\n value?: undefined;\n};\nexport const VersionedHostWorkerEndOperationResponse: Codec;\n/** Pending-operation error. */\nexport type HostWorkerOperationError = \n/**\n * The product is already at the host's per-product limit of open\n * operations.\n */\n{\n tag: \"TooManyOpen\";\n value?: undefined;\n}\n/** Catch-all host failure. */\n | {\n tag: \"Unknown\";\n value: {\n reason: string;\n };\n};\nexport const HostWorkerOperationError: Codec;\n/** How an image meets the box its modifiers size. */\nexport type ImageFit = \"None\" | \"Fill\" | \"Cover\" | \"Contain\" | \"ScaleDown\";\nexport const ImageFit: Codec;\n/** Properties of an `Image`. */\nexport interface ImageProps {\n /** Where the image bytes come from. */\n source: ImageSource;\n /** Defaults to `Fill`. */\n fit?: ImageFit;\n}\nexport const ImageProps: Codec;\n/** Where image bytes come from. The host fetches them; the tree carries no URL. */\nexport type ImageSource = \n/** A Bulletin chain blob, addressed by its CID. */\n{\n tag: \"Bulletin\";\n value: string;\n}\n/**\n * A file inside the product's executable archive, as a path relative to\n * the archive root.\n */\n | {\n tag: \"Archive\";\n value: string;\n};\nexport const ImageSource: Codec;\n/**\n * A user-imported (legacy) account: public key plus an optional user-chosen\n * display name.\n *\n * Returned by [`HostGetLegacyAccountsResponse`]. Distinct from\n * [`ProductAccount`], which is protocol-derived and never carries a label.\n */\nexport interface LegacyAccount {\n /** The account public key (variable-length bytes). */\n publicKey: HexString;\n /** Optional user-chosen display name. */\n name?: string;\n}\nexport const LegacyAccount: Codec;\n/**\n * Transaction payload for a legacy (non-product) account.\n *\n * Identical to [`ProductAccountTxPayload`] except the signer is a raw\n * 32-byte account identifier.\n */\nexport interface LegacyAccountTxPayload {\n /** Raw 32-byte public key of the legacy account. */\n signer: HexString;\n /** Chain where the transaction will execute. */\n genesisHash: HexString;\n /** SCALE-encoded Call data. */\n callData: HexString;\n /** Transaction extensions supplied by the caller. */\n extensions: Array;\n /**\n * Version of the transaction extensions in `extensions`, as the runtime\n * numbers them.\n */\n txExtVersion: number;\n}\nexport const LegacyAccountTxPayload: Codec;\n/** Layout and styling applied to one node. */\nexport type Modifier = \n/** Outer spacing. */\n{\n tag: \"Margin\";\n value: Dimensions;\n}\n/** Inner spacing. */\n | {\n tag: \"Padding\";\n value: Dimensions;\n}\n/** Background fill. */\n | {\n tag: \"Background\";\n value: Background;\n}\n/** Border. */\n | {\n tag: \"Border\";\n value: BorderStyle;\n}\n/** Fixed height. */\n | {\n tag: \"Height\";\n value: Size;\n}\n/** Fixed width. */\n | {\n tag: \"Width\";\n value: Size;\n}\n/** Minimum width. */\n | {\n tag: \"MinWidth\";\n value: Size;\n}\n/** Minimum height. */\n | {\n tag: \"MinHeight\";\n value: Size;\n}\n/** Fill the available width. */\n | {\n tag: \"FillWidth\";\n value: boolean;\n}\n/** Fill the available height. */\n | {\n tag: \"FillHeight\";\n value: boolean;\n}\n/** 0 is transparent, 255 is opaque. */\n | {\n tag: \"Opacity\";\n value: number;\n}\n/** Compositing mode against what is behind the node. */\n | {\n tag: \"BlendingMode\";\n value: BlendingMode;\n};\nexport const Modifier: Codec;\n/** Outcome of starting a chain-head operation. */\nexport type OperationStartedResult = \n/** The operation was accepted; results arrive as follow events. */\n{\n tag: \"Started\";\n value: {\n operationId: string;\n };\n}\n/** Too many operations are in progress; retry after some complete. */\n | {\n tag: \"LimitReached\";\n value?: undefined;\n};\nexport const OperationStartedResult: Codec;\n/**\n * Source for a payment top-up operation.\n *\n * See [RFC 0006].\n *\n * [RFC 0006]: https://github.com/paritytech/triangle-js-sdks/pull/94\n */\nexport type PaymentTopUpSource = \n/** Fund from one of the calling product's scoped accounts. */\n{\n tag: \"ProductAccount\";\n value: {\n derivationIndex: DerivationIndex;\n };\n}\n/**\n * Fund from a one-time account represented by its private key. This is a\n * standard account holding public funds, not a coin key.\n */\n | {\n tag: \"PrivateKey\";\n value: {\n sr25519SecretKey: HexString;\n };\n}\n/**\n * Fund directly from coin secret keys. Each key is an sr25519 secret\n * controlling a single coin.\n */\n | {\n tag: \"Coins\";\n value: {\n sr25519SecretKeys: Array;\n };\n};\nexport const PaymentTopUpSource: Codec;\n/** One of the calling product's Pocket cards. */\nexport interface PocketCard {\n /** Card label declared by the product, unique within the product. */\n cardId: string;\n /** Placed by the host itself; removable by neither the user nor the product. */\n privileged: boolean;\n}\nexport const PocketCard: Codec;\n/** Preimage submission error. */\nexport type PreimageSubmitError = \n/** Catch-all. */\n{\n tag: \"Unknown\";\n value: {\n reason: string;\n };\n};\nexport const PreimageSubmitError: Codec;\n/** A product account: public key only, no display name. */\nexport interface ProductAccount {\n /** The account public key (variable-length bytes). */\n publicKey: HexString;\n}\nexport const ProductAccount: Codec;\n/**\n * Identifies a product-specific account by combining a dotNS domain name with a\n * derivation index.\n */\nexport interface ProductAccountId {\n /** A dotNS domain name identifier (e.g., `\"my-product.dot\"`). */\n dotNsIdentifier: string;\n /** Account selector within the product subtree. */\n derivationIndex: DerivationIndex;\n}\nexport const ProductAccountId: Codec;\n/**\n * Transaction payload for a product account.\n *\n * Contains everything the host needs to construct a signed extrinsic.\n * The signer is a [`ProductAccountId`]; the host resolves the\n * corresponding key pair through its account management layer.\n */\nexport interface ProductAccountTxPayload {\n /** Product account that will sign the transaction. */\n signer: ProductAccountId;\n /** Chain where the transaction will execute. */\n genesisHash: HexString;\n /** SCALE-encoded Call data. */\n callData: HexString;\n /** Transaction extensions supplied by the caller. */\n extensions: Array;\n /**\n * Version of the transaction extensions in `extensions`, as the runtime\n * numbers them.\n */\n txExtVersion: number;\n /**\n * Contact handles `call_data` names, which the host replaces with the\n * accounts they resolve to before anything is signed or shown.\n *\n * A product declares them rather than passing offsets: an offset is a\n * number it computes about its own encoding and gets wrong silently,\n * while a declared handle is either in the call or it is not, and a host\n * that cannot find one refuses rather than signing a call that names\n * somebody else. A call naming nobody leaves this empty.\n */\n contacts: Array;\n}\nexport const ProductAccountTxPayload: Codec;\n/**\n * A product-scoped proof context: a product and a context within it.\n *\n * Hashed (with a `product//` prefix) into the 32-byte context bound\n * to a ring VRF proof, so contexts cannot collide across products and the same\n * member key under different contexts yields unlinkable aliases.\n */\nexport interface ProductProofContext {\n /** dotNS product identifier (e.g. `\"my-product.dot\"`) scoping the context. */\n productId: string;\n /**\n * Selector distinguishing contexts within the product; expands to the\n * same 32-byte derivation index as [`ProductAccountId::derivation_index`].\n */\n suffix: DerivationIndex;\n}\nexport const ProductProofContext: Codec;\n/** Versioned envelope for [`ProductRendererRenderError`]. */\nexport type VersionedProductRendererRenderError = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: GenericError;\n};\nexport const VersionedProductRendererRenderError: Codec;\n/** Versioned envelope for [`ProductRendererRenderItem`]. */\nexport type VersionedProductRendererRenderItem = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: RendererNode;\n};\nexport const VersionedProductRendererRenderItem: Codec;\n/** Versioned envelope for [`ProductRendererRenderRequest`]. */\nexport type VersionedProductRendererRenderRequest = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: ProductRendererRenderRequest;\n};\nexport const VersionedProductRendererRenderRequest: Codec;\n/** Raw data to sign -- either binary bytes or a string message. */\nexport type RawPayload = \n/** Raw binary data to sign. */\n{\n tag: \"Bytes\";\n value: {\n bytes: HexString;\n };\n}\n/** String message to sign. */\n | {\n tag: \"Payload\";\n value: {\n payload: string;\n };\n};\nexport const RawPayload: Codec;\n/** A registered ring-VRF key entry. */\nexport interface RegisteredRingVrfKey {\n /** Stable public name of the key. */\n handle: ProductAccountId;\n /** Rings the owning product declared this key for. */\n rings: Array;\n /** Present when the caller owns the key or requested/granted disclosure. */\n publicKey?: HexString;\n}\nexport const RegisteredRingVrfKey: Codec;\n/** Versioned envelope for [`RemoteChainHeadBodyError`]. */\nexport type VersionedRemoteChainHeadBodyError = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: GenericError;\n};\nexport const VersionedRemoteChainHeadBodyError: Codec;\n/** Versioned envelope for [`RemoteChainHeadBodyRequest`]. */\nexport type VersionedRemoteChainHeadBodyRequest = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: RemoteChainHeadBodyRequest;\n};\nexport const VersionedRemoteChainHeadBodyRequest: Codec;\n/** Versioned envelope for [`RemoteChainHeadBodyResponse`]. */\nexport type VersionedRemoteChainHeadBodyResponse = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: RemoteChainHeadBodyResponse;\n};\nexport const VersionedRemoteChainHeadBodyResponse: Codec;\n/** Versioned envelope for [`RemoteChainHeadCallError`]. */\nexport type VersionedRemoteChainHeadCallError = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: GenericError;\n};\nexport const VersionedRemoteChainHeadCallError: Codec;\n/** Versioned envelope for [`RemoteChainHeadCallRequest`]. */\nexport type VersionedRemoteChainHeadCallRequest = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: RemoteChainHeadCallRequest;\n};\nexport const VersionedRemoteChainHeadCallRequest: Codec;\n/** Versioned envelope for [`RemoteChainHeadCallResponse`]. */\nexport type VersionedRemoteChainHeadCallResponse = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: RemoteChainHeadCallResponse;\n};\nexport const VersionedRemoteChainHeadCallResponse: Codec;\n/** Versioned envelope for [`RemoteChainHeadContinueError`]. */\nexport type VersionedRemoteChainHeadContinueError = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: GenericError;\n};\nexport const VersionedRemoteChainHeadContinueError: Codec;\n/** Versioned envelope for [`RemoteChainHeadContinueRequest`]. */\nexport type VersionedRemoteChainHeadContinueRequest = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: RemoteChainHeadContinueRequest;\n};\nexport const VersionedRemoteChainHeadContinueRequest: Codec;\n/** Versioned envelope for [`RemoteChainHeadContinueResponse`]. */\nexport type VersionedRemoteChainHeadContinueResponse = \n/** Version 1 (no payload). */\n{\n tag: \"V1\";\n value?: undefined;\n};\nexport const VersionedRemoteChainHeadContinueResponse: Codec;\n/** Versioned envelope for [`RemoteChainHeadFollowError`]. */\nexport type VersionedRemoteChainHeadFollowError = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: GenericError;\n};\nexport const VersionedRemoteChainHeadFollowError: Codec;\n/** Versioned envelope for [`RemoteChainHeadFollowItem`]. */\nexport type VersionedRemoteChainHeadFollowItem = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: RemoteChainHeadFollowItem;\n};\nexport const VersionedRemoteChainHeadFollowItem: Codec;\n/** Versioned envelope for [`RemoteChainHeadFollowRequest`]. */\nexport type VersionedRemoteChainHeadFollowRequest = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: RemoteChainHeadFollowRequest;\n};\nexport const VersionedRemoteChainHeadFollowRequest: Codec;\n/** Versioned envelope for [`RemoteChainHeadHeaderError`]. */\nexport type VersionedRemoteChainHeadHeaderError = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: GenericError;\n};\nexport const VersionedRemoteChainHeadHeaderError: Codec;\n/** Versioned envelope for [`RemoteChainHeadHeaderRequest`]. */\nexport type VersionedRemoteChainHeadHeaderRequest = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: RemoteChainHeadHeaderRequest;\n};\nexport const VersionedRemoteChainHeadHeaderRequest: Codec;\n/** Versioned envelope for [`RemoteChainHeadHeaderResponse`]. */\nexport type VersionedRemoteChainHeadHeaderResponse = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: RemoteChainHeadHeaderResponse;\n};\nexport const VersionedRemoteChainHeadHeaderResponse: Codec;\n/** Versioned envelope for [`RemoteChainHeadStopOperationError`]. */\nexport type VersionedRemoteChainHeadStopOperationError = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: GenericError;\n};\nexport const VersionedRemoteChainHeadStopOperationError: Codec;\n/** Versioned envelope for [`RemoteChainHeadStopOperationRequest`]. */\nexport type VersionedRemoteChainHeadStopOperationRequest = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: RemoteChainHeadStopOperationRequest;\n};\nexport const VersionedRemoteChainHeadStopOperationRequest: Codec;\n/** Versioned envelope for [`RemoteChainHeadStopOperationResponse`]. */\nexport type VersionedRemoteChainHeadStopOperationResponse = \n/** Version 1 (no payload). */\n{\n tag: \"V1\";\n value?: undefined;\n};\nexport const VersionedRemoteChainHeadStopOperationResponse: Codec;\n/** Versioned envelope for [`RemoteChainHeadStorageError`]. */\nexport type VersionedRemoteChainHeadStorageError = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: GenericError;\n};\nexport const VersionedRemoteChainHeadStorageError: Codec;\n/** Versioned envelope for [`RemoteChainHeadStorageRequest`]. */\nexport type VersionedRemoteChainHeadStorageRequest = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: RemoteChainHeadStorageRequest;\n};\nexport const VersionedRemoteChainHeadStorageRequest: Codec;\n/** Versioned envelope for [`RemoteChainHeadStorageResponse`]. */\nexport type VersionedRemoteChainHeadStorageResponse = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: RemoteChainHeadStorageResponse;\n};\nexport const VersionedRemoteChainHeadStorageResponse: Codec;\n/** Versioned envelope for [`RemoteChainHeadUnpinError`]. */\nexport type VersionedRemoteChainHeadUnpinError = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: GenericError;\n};\nexport const VersionedRemoteChainHeadUnpinError: Codec;\n/** Versioned envelope for [`RemoteChainHeadUnpinRequest`]. */\nexport type VersionedRemoteChainHeadUnpinRequest = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: RemoteChainHeadUnpinRequest;\n};\nexport const VersionedRemoteChainHeadUnpinRequest: Codec;\n/** Versioned envelope for [`RemoteChainHeadUnpinResponse`]. */\nexport type VersionedRemoteChainHeadUnpinResponse = \n/** Version 1 (no payload). */\n{\n tag: \"V1\";\n value?: undefined;\n};\nexport const VersionedRemoteChainHeadUnpinResponse: Codec;\n/** Versioned envelope for [`RemoteChainInfoError`]. */\nexport type VersionedRemoteChainInfoError = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: RemoteChainInfoError;\n};\nexport const VersionedRemoteChainInfoError: Codec;\n/** Versioned envelope for [`RemoteChainInfoRequest`]. */\nexport type VersionedRemoteChainInfoRequest = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: RemoteChainInfoRequest;\n};\nexport const VersionedRemoteChainInfoRequest: Codec;\n/** Versioned envelope for [`RemoteChainInfoResponse`]. */\nexport type VersionedRemoteChainInfoResponse = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: RemoteChainInfoResponse;\n};\nexport const VersionedRemoteChainInfoResponse: Codec;\n/** Versioned envelope for [`RemoteChainSpecChainNameError`]. */\nexport type VersionedRemoteChainSpecChainNameError = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: GenericError;\n};\nexport const VersionedRemoteChainSpecChainNameError: Codec;\n/** Versioned envelope for [`RemoteChainSpecChainNameRequest`]. */\nexport type VersionedRemoteChainSpecChainNameRequest = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: RemoteChainSpecChainNameRequest;\n};\nexport const VersionedRemoteChainSpecChainNameRequest: Codec;\n/** Versioned envelope for [`RemoteChainSpecChainNameResponse`]. */\nexport type VersionedRemoteChainSpecChainNameResponse = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: RemoteChainSpecChainNameResponse;\n};\nexport const VersionedRemoteChainSpecChainNameResponse: Codec;\n/** Versioned envelope for [`RemoteChainSpecGenesisHashError`]. */\nexport type VersionedRemoteChainSpecGenesisHashError = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: GenericError;\n};\nexport const VersionedRemoteChainSpecGenesisHashError: Codec;\n/** Versioned envelope for [`RemoteChainSpecGenesisHashRequest`]. */\nexport type VersionedRemoteChainSpecGenesisHashRequest = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: RemoteChainSpecGenesisHashRequest;\n};\nexport const VersionedRemoteChainSpecGenesisHashRequest: Codec;\n/** Versioned envelope for [`RemoteChainSpecGenesisHashResponse`]. */\nexport type VersionedRemoteChainSpecGenesisHashResponse = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: RemoteChainSpecGenesisHashResponse;\n};\nexport const VersionedRemoteChainSpecGenesisHashResponse: Codec;\n/** Versioned envelope for [`RemoteChainSpecPropertiesError`]. */\nexport type VersionedRemoteChainSpecPropertiesError = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: GenericError;\n};\nexport const VersionedRemoteChainSpecPropertiesError: Codec;\n/** Versioned envelope for [`RemoteChainSpecPropertiesRequest`]. */\nexport type VersionedRemoteChainSpecPropertiesRequest = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: RemoteChainSpecPropertiesRequest;\n};\nexport const VersionedRemoteChainSpecPropertiesRequest: Codec;\n/** Versioned envelope for [`RemoteChainSpecPropertiesResponse`]. */\nexport type VersionedRemoteChainSpecPropertiesResponse = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: RemoteChainSpecPropertiesResponse;\n};\nexport const VersionedRemoteChainSpecPropertiesResponse: Codec;\n/** Versioned envelope for [`RemoteChainTransactionBroadcastError`]. */\nexport type VersionedRemoteChainTransactionBroadcastError = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: GenericError;\n};\nexport const VersionedRemoteChainTransactionBroadcastError: Codec;\n/** Versioned envelope for [`RemoteChainTransactionBroadcastRequest`]. */\nexport type VersionedRemoteChainTransactionBroadcastRequest = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: RemoteChainTransactionBroadcastRequest;\n};\nexport const VersionedRemoteChainTransactionBroadcastRequest: Codec;\n/** Versioned envelope for [`RemoteChainTransactionBroadcastResponse`]. */\nexport type VersionedRemoteChainTransactionBroadcastResponse = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: RemoteChainTransactionBroadcastResponse;\n};\nexport const VersionedRemoteChainTransactionBroadcastResponse: Codec;\n/** Versioned envelope for [`RemoteChainTransactionStopError`]. */\nexport type VersionedRemoteChainTransactionStopError = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: GenericError;\n};\nexport const VersionedRemoteChainTransactionStopError: Codec;\n/** Versioned envelope for [`RemoteChainTransactionStopRequest`]. */\nexport type VersionedRemoteChainTransactionStopRequest = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: RemoteChainTransactionStopRequest;\n};\nexport const VersionedRemoteChainTransactionStopRequest: Codec;\n/** Versioned envelope for [`RemoteChainTransactionStopResponse`]. */\nexport type VersionedRemoteChainTransactionStopResponse = \n/** Version 1 (no payload). */\n{\n tag: \"V1\";\n value?: undefined;\n};\nexport const VersionedRemoteChainTransactionStopResponse: Codec;\n/**\n * One remote-operation permission requested by the product (RFC 0002).\n *\n * `ChainSubmit`, `PreimageSubmit`, and `StatementSubmit` are also triggered\n * implicitly by the corresponding business calls when not yet granted.\n */\nexport type RemotePermission = \n/**\n * Outbound HTTP/WebSocket access to a set of domains. External navigation\n * uses [`HostDevicePermissionRequest::OpenUrl`] instead.\n */\n{\n tag: \"Remote\";\n value: {\n domains: Array;\n };\n}\n/**\n * WebRTC access.\n *\n * The container authorizes each peer connection through Rust before its\n * first network method. Later methods on that connection share the same\n * decision, so a one-use grant permits one connection. New connections\n * check current permissions without requiring a page reload.\n *\n * Camera and microphone capture is gated by the OS permission prompts and\n * [`HostDevicePermissionRequest`], not by this permission.\n */\n | {\n tag: \"WebRtc\";\n value?: undefined;\n}\n/** Submitting transactions on behalf of the user via `remote_chain_transaction_broadcast`. */\n | {\n tag: \"ChainSubmit\";\n value?: undefined;\n}\n/** Submitting preimages on behalf of the user via `remote_preimage_submit`. */\n | {\n tag: \"PreimageSubmit\";\n value?: undefined;\n}\n/** Submitting statements on behalf of the user via `remote_statement_store_submit`. */\n | {\n tag: \"StatementSubmit\";\n value?: undefined;\n};\nexport const RemotePermission: Codec;\n/** Versioned envelope for [`RemotePermissionError`]. */\nexport type VersionedRemotePermissionError = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: GenericError;\n};\nexport const VersionedRemotePermissionError: Codec;\n/** Versioned envelope for [`RemotePermissionRequest`]. */\nexport type VersionedRemotePermissionRequest = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: RemotePermissionRequest;\n};\nexport const VersionedRemotePermissionRequest: Codec;\n/** Versioned envelope for [`RemotePermissionResponse`]. */\nexport type VersionedRemotePermissionResponse = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: RemotePermissionResponse;\n};\nexport const VersionedRemotePermissionResponse: Codec;\n/** Versioned envelope for [`RemotePreimageLookupSubscribeError`]. */\nexport type VersionedRemotePreimageLookupSubscribeError = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: GenericError;\n};\nexport const VersionedRemotePreimageLookupSubscribeError: Codec;\n/** Versioned envelope for [`RemotePreimageLookupSubscribeItem`]. */\nexport type VersionedRemotePreimageLookupSubscribeItem = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: RemotePreimageLookupSubscribeItem;\n};\nexport const VersionedRemotePreimageLookupSubscribeItem: Codec;\n/** Versioned envelope for [`RemotePreimageLookupSubscribeRequest`]. */\nexport type VersionedRemotePreimageLookupSubscribeRequest = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: RemotePreimageLookupSubscribeRequest;\n};\nexport const VersionedRemotePreimageLookupSubscribeRequest: Codec;\n/** Versioned envelope for [`RemotePreimageSubmitError`]. */\nexport type VersionedRemotePreimageSubmitError = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: PreimageSubmitError;\n};\nexport const VersionedRemotePreimageSubmitError: Codec;\n/** Versioned envelope for [`RemotePreimageSubmitRequest`]. */\nexport type VersionedRemotePreimageSubmitRequest = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HexString;\n};\nexport const VersionedRemotePreimageSubmitRequest: Codec;\n/** Versioned envelope for [`RemotePreimageSubmitResponse`]. */\nexport type VersionedRemotePreimageSubmitResponse = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HexString;\n};\nexport const VersionedRemotePreimageSubmitResponse: Codec;\n/** Versioned envelope for [`RemoteStatementStoreCreateProofAuthorizedError`]. */\nexport type VersionedRemoteStatementStoreCreateProofAuthorizedError = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: RemoteStatementStoreCreateProofError;\n};\nexport const VersionedRemoteStatementStoreCreateProofAuthorizedError: Codec;\n/** Versioned envelope for [`RemoteStatementStoreCreateProofAuthorizedRequest`]. */\nexport type VersionedRemoteStatementStoreCreateProofAuthorizedRequest = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: Statement;\n};\nexport const VersionedRemoteStatementStoreCreateProofAuthorizedRequest: Codec;\n/** Versioned envelope for [`RemoteStatementStoreCreateProofAuthorizedResponse`]. */\nexport type VersionedRemoteStatementStoreCreateProofAuthorizedResponse = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: RemoteStatementStoreCreateProofResponse;\n};\nexport const VersionedRemoteStatementStoreCreateProofAuthorizedResponse: Codec;\n/** Versioned envelope for [`RemoteStatementStoreCreateProofError`]. */\nexport type VersionedRemoteStatementStoreCreateProofError = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: RemoteStatementStoreCreateProofError;\n};\nexport const VersionedRemoteStatementStoreCreateProofError: Codec;\n/** Versioned envelope for [`RemoteStatementStoreCreateProofRequest`]. */\nexport type VersionedRemoteStatementStoreCreateProofRequest = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: RemoteStatementStoreCreateProofRequest;\n};\nexport const VersionedRemoteStatementStoreCreateProofRequest: Codec;\n/** Versioned envelope for [`RemoteStatementStoreCreateProofResponse`]. */\nexport type VersionedRemoteStatementStoreCreateProofResponse = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: RemoteStatementStoreCreateProofResponse;\n};\nexport const VersionedRemoteStatementStoreCreateProofResponse: Codec;\n/** Versioned envelope for [`RemoteStatementStoreSubmitError`]. */\nexport type VersionedRemoteStatementStoreSubmitError = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: GenericError;\n};\nexport const VersionedRemoteStatementStoreSubmitError: Codec;\n/** Versioned envelope for [`RemoteStatementStoreSubmitRequest`]. */\nexport type VersionedRemoteStatementStoreSubmitRequest = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: SignedStatement;\n};\nexport const VersionedRemoteStatementStoreSubmitRequest: Codec;\n/** Versioned envelope for [`RemoteStatementStoreSubmitResponse`]. */\nexport type VersionedRemoteStatementStoreSubmitResponse = \n/** Version 1 (no payload). */\n{\n tag: \"V1\";\n value?: undefined;\n};\nexport const VersionedRemoteStatementStoreSubmitResponse: Codec;\n/** Versioned envelope for [`RemoteStatementStoreSubscribeError`]. */\nexport type VersionedRemoteStatementStoreSubscribeError = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: GenericError;\n};\nexport const VersionedRemoteStatementStoreSubscribeError: Codec;\n/** Versioned envelope for [`RemoteStatementStoreSubscribeItem`]. */\nexport type VersionedRemoteStatementStoreSubscribeItem = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: RemoteStatementStoreSubscribeItem;\n};\nexport const VersionedRemoteStatementStoreSubscribeItem: Codec;\n/** Versioned envelope for [`RemoteStatementStoreSubscribeRequest`]. */\nexport type VersionedRemoteStatementStoreSubscribeRequest = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: RemoteStatementStoreSubscribeRequest;\n};\nexport const VersionedRemoteStatementStoreSubscribeRequest: Codec;\n/** Where a product-rendered body lives, and the id that names it there. */\nexport type RenderContext = \n/** A message in a chat room. */\n{\n tag: \"ChatMessage\";\n value: {\n roomId: string;\n messageId: string;\n messageType: string;\n };\n}\n/** A candidate answered to an input query. */\n | {\n tag: \"InputWidget\";\n value: {\n candidateId: string;\n };\n}\n/** A card face in the host's Pocket collection. */\n | {\n tag: \"PocketCard\";\n value: {\n cardId: string;\n };\n};\nexport const RenderContext: Codec;\n/**\n * A node in a product-rendered tree. Container variants recurse through\n * `children`.\n */\nexport type RendererNode = \n/** Draws nothing. */\n{\n tag: \"Nil\";\n value?: undefined;\n}\n/** A text run. */\n | {\n tag: \"String\";\n value: {\n text: string;\n };\n}\n/** Generic container. */\n | {\n tag: \"Box\";\n value: {\n modifiers: Array;\n props: BoxProps;\n children: Array;\n };\n}\n/** Vertical layout. */\n | {\n tag: \"Column\";\n value: {\n modifiers: Array;\n props: ColumnProps;\n children: Array;\n };\n}\n/** Horizontal layout. */\n | {\n tag: \"Row\";\n value: {\n modifiers: Array;\n props: RowProps;\n children: Array;\n };\n}\n/** Flexible space. */\n | {\n tag: \"Spacer\";\n value: {\n modifiers: Array;\n };\n}\n/** Styled text. */\n | {\n tag: \"Text\";\n value: {\n modifiers: Array;\n props: TextProps;\n children: Array;\n };\n}\n/** Interactive button. */\n | {\n tag: \"Button\";\n value: {\n modifiers: Array;\n props: ButtonProps;\n children: Array;\n };\n}\n/** Single-line text input. */\n | {\n tag: \"TextField\";\n value: {\n modifiers: Array;\n props: TextFieldProps;\n };\n}\n/** Image, sized by modifiers. */\n | {\n tag: \"Image\";\n value: {\n modifiers: Array;\n props: ImageProps;\n };\n}\n/** Applies its effect to its children. */\n | {\n tag: \"Effect\";\n value: {\n props: EffectProps;\n children: Array;\n };\n};\nexport const RendererNode: Codec;\n/** Error from [`crate::api::ResourceAllocation::request`]. */\nexport type ResourceAllocationError = \n/** Catch-all. */\n{\n tag: \"Unknown\";\n value: {\n reason: string;\n };\n};\nexport const ResourceAllocationError: Codec;\n/**\n * Locates a ring for ring VRF operations using only identifiers that are\n * stable across membership changes.\n */\nexport interface RingLocation {\n /** Genesis hash of the chain hosting the ring. */\n chainId: HexString;\n /** Path addressing the ring within the chain. */\n junctions: Array;\n}\nexport const RingLocation: Codec;\n/** A single step in a [`RingLocation`] path, addressing a ring within a chain. */\nexport type RingLocationJunction = \n/** Pallet instance hosting the ring collection. */\n{\n tag: \"PalletInstance\";\n value: number;\n}\n/** Ring collection identifier within the pallet. */\n | {\n tag: \"CollectionId\";\n value: HexString;\n};\nexport const RingLocationJunction: Codec;\n/** How much of a registry entry the caller asks for. */\nexport type RingVrfKeyDisclosure = \"Anonymized\" | \"PublicKey\";\nexport const RingVrfKeyDisclosure: Codec;\n/** Properties of a `Row`. */\nexport interface RowProps {\n /** Cross-axis alignment of children. */\n verticalAlignment?: VerticalAlignment;\n /** Main-axis distribution of children. */\n horizontalArrangement?: Arrangement;\n}\nexport const RowProps: Codec;\n/** One entry of a runtime's supported API list. */\nexport interface RuntimeApi {\n /** Runtime API name. */\n name: string;\n /** Runtime API version. */\n version: number;\n}\nexport const RuntimeApi: Codec;\n/** Runtime version information for a block's runtime. */\nexport interface RuntimeSpec {\n /** Specification name. */\n specName: string;\n /** Implementation name. */\n implName: string;\n /** Spec version number. */\n specVersion: number;\n /** Implementation version. */\n implVersion: number;\n /** Transaction format version. */\n transactionVersion?: number;\n /** Supported runtime APIs. */\n apis: Array;\n}\nexport const RuntimeSpec: Codec;\n/** Runtime attached to follow events, either a decoded spec or a decode error. */\nexport type RuntimeType = \n/** Runtime spec decoded successfully. */\n{\n tag: \"Valid\";\n value: RuntimeSpec;\n}\n/** The runtime could not be decoded. */\n | {\n tag: \"Invalid\";\n value: {\n error: string;\n };\n};\nexport const RuntimeType: Codec;\n/** Outline of a background or border. */\nexport type Shape = \n/** Rounded corners with the given radius. */\n{\n tag: \"Rounded\";\n value: Size;\n}\n/** Circular shape. */\n | {\n tag: \"Circle\";\n value?: undefined;\n}\n/** Square corners. */\n | {\n tag: \"Square\";\n value?: undefined;\n};\nexport const Shape: Codec;\n/** A statement with a required (not optional) proof. */\nexport interface SignedStatement {\n /** Required cryptographic proof. */\n proof: StatementProof;\n /** Optional decryption key. */\n decryptionKey?: HexString;\n /** Optional Unix timestamp expiry. */\n expiry?: bigint;\n /** Optional channel. */\n channel?: HexString;\n /** [u8; 32] tags. */\n topics: Array;\n /** Optional data payload. */\n data?: HexString;\n}\nexport const SignedStatement: Codec;\n/** A size in logical pixels, SCALE-encoded as `Compact`. */\nexport type Size = number | bigint;\nexport const Size: Codec;\n/** A statement with optional proof and metadata. */\nexport interface Statement {\n /** Optional cryptographic proof. */\n proof?: StatementProof;\n /** Optional decryption key. */\n decryptionKey?: HexString;\n /** Optional Unix timestamp expiry. */\n expiry?: bigint;\n /** Optional channel. */\n channel?: HexString;\n /** [u8; 32] tags. */\n topics: Array;\n /** Optional data payload. */\n data?: HexString;\n}\nexport const Statement: Codec;\n/** Cryptographic proof for a statement. */\nexport type StatementProof = \n/** Sr25519 signature proof. */\n{\n tag: \"Sr25519\";\n value: {\n signature: HexString;\n signer: HexString;\n };\n}\n/** Ed25519 signature proof. */\n | {\n tag: \"Ed25519\";\n value: {\n signature: HexString;\n signer: HexString;\n };\n}\n/** ECDSA signature proof. */\n | {\n tag: \"Ecdsa\";\n value: {\n signature: HexString;\n signer: HexString;\n };\n}\n/** On-chain event proof. */\n | {\n tag: \"OnChain\";\n value: {\n who: HexString;\n blockHash: HexString;\n event: bigint;\n };\n};\nexport const StatementProof: Codec;\n/** A single key query within a chain-head storage request. */\nexport interface StorageQueryItem {\n /** Storage key to query. */\n key: HexString;\n /** What to return. */\n queryType: StorageQueryType;\n}\nexport const StorageQueryItem: Codec;\n/** What a chain-head storage query returns for a key. */\nexport type StorageQueryType = \"Value\" | \"Hash\" | \"ClosestDescendantMerkleValue\" | \"DescendantsValues\" | \"DescendantsHashes\";\nexport const StorageQueryType: Codec;\n/** Result for one queried storage key. */\nexport interface StorageResultItem {\n /** The queried key. */\n key: HexString;\n /** Value, if requested. */\n value?: HexString;\n /** Hash, if requested. */\n hash?: HexString;\n /** Merkle value, if requested. */\n closestDescendantMerkleValue?: HexString;\n}\nexport const StorageResultItem: Codec;\n/** Properties of a `TextField`. */\nexport interface TextFieldProps {\n /** Current value. */\n text: string;\n /** Shown when the value is empty. */\n placeholder?: string;\n /** Field label. */\n label?: string;\n /** Whether the field accepts input. Absent leaves the default to the host. */\n enabled?: boolean;\n /**\n * Action triggered on every value change. The action carries the new\n * value as UTF-8 bytes, with no length prefix.\n */\n valueChangeAction?: string;\n}\nexport const TextFieldProps: Codec;\n/** Properties of a `Text`. */\nexport interface TextProps {\n /** Typography preset. */\n style?: TypographyStyle;\n /** Text color. */\n color?: ColorToken;\n}\nexport const TextProps: Codec;\n/** Identifies a named theme. */\nexport type ThemeName = \n/** A custom named theme. */\n{\n tag: \"Custom\";\n value: string;\n}\n/** The host's default theme. */\n | {\n tag: \"Default\";\n value?: undefined;\n};\nexport const ThemeName: Codec;\n/** Light or dark variant. */\nexport type ThemeVariant = \"Light\" | \"Dark\";\nexport const ThemeVariant: Codec;\n/** A signed extension for a transaction payload. */\nexport interface TxPayloadExtension {\n /** Extension name (e.g., `\"CheckSpecVersion\"`). */\n id: string;\n /** SCALE-encoded extra data (in extrinsic body). */\n extra: HexString;\n /** SCALE-encoded implicit data (signed, not in body). */\n additionalSigned: HexString;\n}\nexport const TxPayloadExtension: Codec;\n/** Typography presets, resolved by the host's design system. */\nexport type TypographyStyle = \"HeadlineLarge\" | \"TitleMediumRegular\" | \"BodyLargeRegular\" | \"BodyMediumRegular\" | \"BodySmallRegular\";\nexport const TypographyStyle: Codec;\n/** User's authentication state. */\nexport type HostAccountConnectionStatusSubscribeItem = \"Disconnected\" | \"Connected\";\nexport const HostAccountConnectionStatusSubscribeItem: Codec;\n/** Error returned when ring VRF proof creation fails. */\nexport type HostAccountCreateProofError = \n/** Ring not available at the specified location. */\n{\n tag: \"RingNotFound\";\n value?: undefined;\n}\n/** The registered member key is not a member of the requested ring. */\n | {\n tag: \"NotMember\";\n value?: undefined;\n}\n/** The key handle is not registered. */\n | {\n tag: \"KeyNotRegistered\";\n value?: undefined;\n}\n/** The key handle is not registered for the requested ring. */\n | {\n tag: \"KeyNotInRing\";\n value?: undefined;\n}\n/** The foreign key owner has not allowlisted the caller. */\n | {\n tag: \"NotAllowlisted\";\n value?: undefined;\n}\n/** User or host rejected. */\n | {\n tag: \"Rejected\";\n value?: undefined;\n}\n/** Catch-all. */\n | {\n tag: \"Unknown\";\n value: {\n reason: string;\n };\n};\nexport const HostAccountCreateProofError: Codec;\n/** Request to create a ring VRF proof. */\nexport interface HostAccountCreateProofRequest {\n /** Ring-VRF key handle naming the member key to use. */\n keyHandle: ProductAccountId;\n /** Product-scoped context the derived alias is bound to. */\n context: ProductProofContext;\n /** Ring to generate the proof against. */\n ringLocation: RingLocation;\n /** Opaque message bound into the proof. */\n message: HexString;\n}\nexport const HostAccountCreateProofRequest: Codec;\n/**\n * Response containing a ring VRF proof and the values needed to verify it\n * against a downstream precompile.\n */\nexport interface HostAccountCreateProofResponse {\n /** Variable-length ring VRF proof bytes. */\n proof: HexString;\n /** Alias derived for the request's context. */\n contextualAlias: ContextualAlias;\n /** Index of the selected member key within the ring. */\n ringIndex: number;\n /** Ring revision the proof was generated against. */\n ringRevision: number;\n}\nexport const HostAccountCreateProofResponse: Codec;\n/** Error returned when contextual alias derivation fails. */\nexport type HostAccountGetAliasError = \n/** Ring not available at the specified location. */\n{\n tag: \"RingNotFound\";\n value?: undefined;\n}\n/** The registered member key is not a member of the requested ring. */\n | {\n tag: \"NotMember\";\n value?: undefined;\n}\n/** The key handle is not registered. */\n | {\n tag: \"KeyNotRegistered\";\n value?: undefined;\n}\n/** The key handle is not registered for the requested ring. */\n | {\n tag: \"KeyNotInRing\";\n value?: undefined;\n}\n/** User or host rejected. */\n | {\n tag: \"Rejected\";\n value?: undefined;\n}\n/** Catch-all. */\n | {\n tag: \"Unknown\";\n value: {\n reason: string;\n };\n};\nexport const HostAccountGetAliasError: Codec;\n/** Request to retrieve the contextual alias for a context and ring. */\nexport interface HostAccountGetAliasRequest {\n /** Ring-VRF key handle naming the member key to use. */\n keyHandle: ProductAccountId;\n /** Product-scoped context to derive the alias for. */\n context: ProductProofContext;\n /** Ring whose member key the host should use; matches `create_proof`. */\n ringLocation: RingLocation;\n}\nexport const HostAccountGetAliasRequest: Codec;\n/** Error returned when credential/account requests fail. */\nexport type HostAccountGetError = \n/** User is not logged in. */\n{\n tag: \"NotConnected\";\n value?: undefined;\n}\n/** User or host rejected the request. */\n | {\n tag: \"Rejected\";\n value?: undefined;\n}\n/** Domain identifier is invalid. */\n | {\n tag: \"DomainNotValid\";\n value?: undefined;\n}\n/** Catch-all error with reason. */\n | {\n tag: \"Unknown\";\n value: {\n reason: string;\n };\n};\nexport const HostAccountGetError: Codec;\n/** Request to retrieve a product-scoped account. */\nexport interface HostAccountGetRequest {\n /** Product account to retrieve. */\n productAccountId: ProductAccountId;\n}\nexport const HostAccountGetRequest: Codec;\n/** Response containing a product-scoped account. */\nexport interface HostAccountGetResponse {\n /** Retrieved product account. */\n account: ProductAccount;\n}\nexport const HostAccountGetResponse: Codec;\n/** Error returned when listing ring-VRF keys fails. */\nexport type HostAccountListRingVrfKeysError = \n/** User is not logged in. */\n{\n tag: \"NotConnected\";\n value?: undefined;\n}\n/** User or host rejected. */\n | {\n tag: \"Rejected\";\n value?: undefined;\n}\n/** Catch-all. */\n | {\n tag: \"Unknown\";\n value: {\n reason: string;\n };\n};\nexport const HostAccountListRingVrfKeysError: Codec;\n/** Request to list registered ring-VRF keys for an owner product. */\nexport interface HostAccountListRingVrfKeysRequest {\n /** Product whose registry entries should be listed. */\n owner: string;\n /** Disclosure level requested by the caller. */\n disclosure: RingVrfKeyDisclosure;\n}\nexport const HostAccountListRingVrfKeysRequest: Codec;\n/** Error returned when ring-VRF key registration fails. */\nexport type HostAccountRegisterRingVrfKeyError = \n/** User is not logged in. */\n{\n tag: \"NotConnected\";\n value?: undefined;\n}\n/** Ring not available at the specified location. */\n | {\n tag: \"RingNotFound\";\n value?: undefined;\n}\n/** User or host rejected. */\n | {\n tag: \"Rejected\";\n value?: undefined;\n}\n/** Catch-all. */\n | {\n tag: \"Unknown\";\n value: {\n reason: string;\n };\n};\nexport const HostAccountRegisterRingVrfKeyError: Codec;\n/** Request to register a ring-VRF key owned by the calling product. */\nexport interface HostAccountRegisterRingVrfKeyRequest {\n /** Key derivation index within the caller's ring-VRF domain. */\n index: DerivationIndex;\n /** Ring this key is declared for. */\n ring: RingLocation;\n}\nexport const HostAccountRegisterRingVrfKeyRequest: Codec;\n/** Error returned when direct ring-VRF key signing fails. */\nexport type HostAccountRingVrfSignError = \n/** User is not logged in. */\n{\n tag: \"NotConnected\";\n value?: undefined;\n}\n/** The key handle is not registered. */\n | {\n tag: \"KeyNotRegistered\";\n value?: undefined;\n}\n/** The foreign key owner has not allowlisted the caller. */\n | {\n tag: \"NotAllowlisted\";\n value?: undefined;\n}\n/** User or host rejected. */\n | {\n tag: \"Rejected\";\n value?: undefined;\n}\n/** Catch-all. */\n | {\n tag: \"Unknown\";\n value: {\n reason: string;\n };\n};\nexport const HostAccountRingVrfSignError: Codec;\n/** Request to sign bytes with a registered ring-VRF key. */\nexport interface HostAccountRingVrfSignRequest {\n /** Registered key handle. */\n keyHandle: ProductAccountId;\n /** Opaque message to sign. */\n message: HexString;\n}\nexport const HostAccountRingVrfSignRequest: Codec;\n/** Error returned when VRF signing fails. */\nexport type HostAccountSignVrfError = \n/** User is not logged in. */\n{\n tag: \"NotConnected\";\n value?: undefined;\n}\n/** User or host rejected the signing confirmation. */\n | {\n tag: \"Rejected\";\n value?: undefined;\n}\n/** Catch-all. */\n | {\n tag: \"Unknown\";\n value: {\n reason: string;\n };\n};\nexport const HostAccountSignVrfError: Codec;\n/**\n * Request to produce an sr25519 VRF signature from a product account over a\n * caller-supplied Merlin transcript.\n */\nexport interface HostAccountSignVrfRequest {\n /** Account whose key signs the VRF. */\n account: ProductAccountId;\n /** Root domain-separation label: `Transcript::new(transcript_label)`. */\n transcriptLabel: HexString;\n /** Transcript items replayed in order as `append_message(label, value)`. */\n items: Array;\n}\nexport const HostAccountSignVrfRequest: Codec;\n/** A chat action received from the host. */\nexport interface HostChatActionSubscribeItem {\n /** Room where the action occurred. */\n roomId: string;\n /** Peer who initiated the action. */\n peer: string;\n /** The action payload. */\n payload: ChatActionPayload;\n}\nexport const HostChatActionSubscribeItem: Codec;\n/** Chat room registration error. */\nexport type HostChatCreateRoomError = \n/** Not allowed. */\n{\n tag: \"PermissionDenied\";\n value?: undefined;\n}\n/** Catch-all. */\n | {\n tag: \"Unknown\";\n value: {\n reason: string;\n };\n};\nexport const HostChatCreateRoomError: Codec;\n/** Request to create a chat room. */\nexport interface HostChatCreateRoomRequest {\n /** Unique room identifier. */\n roomId: string;\n /** Room display name. */\n name: string;\n /** URL or base64 image. */\n icon: string;\n}\nexport const HostChatCreateRoomRequest: Codec;\n/** Result of a room registration. */\nexport interface HostChatCreateRoomResponse {\n /** `New` or `Exists`. */\n status: ChatRoomRegistrationStatus;\n}\nexport const HostChatCreateRoomResponse: Codec;\n/** Item containing the current chat rooms. */\nexport interface HostChatListSubscribeItem {\n /** Chat rooms the product participates in. */\n rooms: Array;\n}\nexport const HostChatListSubscribeItem: Codec;\n/** Chat message posting error. */\nexport type HostChatPostMessageError = \n/** Message exceeded size limit. */\n{\n tag: \"MessageTooLarge\";\n value?: undefined;\n}\n/** Catch-all. */\n | {\n tag: \"Unknown\";\n value: {\n reason: string;\n };\n};\nexport const HostChatPostMessageError: Codec;\n/** Request to post a message to a chat room. */\nexport interface HostChatPostMessageRequest {\n /** Room to post to. */\n roomId: string;\n /** Message content. */\n payload: ChatMessageContent;\n}\nexport const HostChatPostMessageRequest: Codec;\n/** Result of posting a message. */\nexport interface HostChatPostMessageResponse {\n /**\n * Host-assigned message id, and the correlation key for any action the\n * message carries: a trigger names it in [`ActionTrigger::message_id`].\n */\n messageId: string;\n}\nexport const HostChatPostMessageResponse: Codec;\n/** Chat bot registration error. */\nexport type HostChatRegisterBotError = \n/** Not allowed. */\n{\n tag: \"PermissionDenied\";\n value?: undefined;\n}\n/** Catch-all. */\n | {\n tag: \"Unknown\";\n value: {\n reason: string;\n };\n};\nexport const HostChatRegisterBotError: Codec;\n/** Request to register a chat bot. */\nexport interface HostChatRegisterBotRequest {\n /** Unique bot identifier. */\n botId: string;\n /** Bot display name. */\n name: string;\n /** URL or base64 image. */\n icon: string;\n}\nexport const HostChatRegisterBotRequest: Codec;\n/** Result of a bot registration. */\nexport interface HostChatRegisterBotResponse {\n /** `New` or `Exists`. */\n status: ChatBotRegistrationStatus;\n}\nexport const HostChatRegisterBotResponse: Codec;\n/** Request to create a cheque from a local purse to a receivable. */\nexport interface HostCoinPaymentCreateChequeRequest {\n /** Source purse. */\n from: number;\n /** Destination receivable. */\n to: HexString;\n /** Payment amount. */\n amount: number;\n}\nexport const HostCoinPaymentCreateChequeRequest: Codec;\n/** Created cheque response. */\nexport interface HostCoinPaymentCreateChequeResponse {\n /** Encrypted cheque. */\n cheque: CoinPaymentCheque;\n}\nexport const HostCoinPaymentCreateChequeResponse: Codec;\n/** Request to create a new firewalled CoinPayment purse. */\nexport interface HostCoinPaymentCreatePurseRequest {\n /** Human-readable purse name. */\n name: string;\n}\nexport const HostCoinPaymentCreatePurseRequest: Codec;\n/** Created purse identifier. */\nexport interface HostCoinPaymentCreatePurseResponse {\n /** Assigned purse identifier. */\n purse: number;\n}\nexport const HostCoinPaymentCreatePurseResponse: Codec;\n/** Request to create a fresh receivable for a purse. */\nexport interface HostCoinPaymentCreateReceivableRequest {\n /** Target purse for future deposits. */\n into: number;\n}\nexport const HostCoinPaymentCreateReceivableRequest: Codec;\n/** Created receivable response. */\nexport interface HostCoinPaymentCreateReceivableResponse {\n /** Receivable public key. */\n receivable: HexString;\n}\nexport const HostCoinPaymentCreateReceivableResponse: Codec;\n/** Request to delete a purse after draining its balance. */\nexport interface HostCoinPaymentDeletePurseRequest {\n /** Purse to delete. */\n target: number;\n /** Purse that receives drained funds. */\n drainInto: number;\n}\nexport const HostCoinPaymentDeletePurseRequest: Codec;\n/** Request to deposit a cheque into the purse associated with its receivable. */\nexport interface HostCoinPaymentDepositRequest {\n /** Cheque to deposit. */\n cheque: CoinPaymentCheque;\n}\nexport const HostCoinPaymentDepositRequest: Codec;\n/** Stream item for `host_coin_payment_listen_for`. */\nexport type HostCoinPaymentListenForItem = \n/** Handoff channel suitable for inclusion in an invoice. */\n{\n tag: \"Channel\";\n value: CoinPaymentTransmissionChannel;\n}\n/** Cheque received through the handoff channel. */\n | {\n tag: \"Cheque\";\n value: CoinPaymentCheque;\n};\nexport const HostCoinPaymentListenForItem: Codec;\n/** Request to listen for a cheque delivered to a receivable. */\nexport interface HostCoinPaymentListenForRequest {\n /** Receivable to listen for. */\n receivable: HexString;\n}\nexport const HostCoinPaymentListenForRequest: Codec;\n/** Request to query product-visible purse metadata. */\nexport interface HostCoinPaymentQueryPurseRequest {\n /** Purse to query. */\n purse: number;\n}\nexport const HostCoinPaymentQueryPurseRequest: Codec;\n/** Product-visible purse metadata response. */\nexport interface HostCoinPaymentQueryPurseResponse {\n /** Purse information. */\n info: CoinPaymentPurseInfo;\n}\nexport const HostCoinPaymentQueryPurseResponse: Codec;\n/** Request to transfer balance between local purses. */\nexport interface HostCoinPaymentRebalancePurseRequest {\n /** Source purse. */\n from: number;\n /** Destination purse. */\n to: number;\n /** Amount to move. */\n amount: number;\n}\nexport const HostCoinPaymentRebalancePurseRequest: Codec;\n/** Request to refund coins associated with a receivable. */\nexport interface HostCoinPaymentRefundRequest {\n /** Receivable to refund. */\n receivable: HexString;\n}\nexport const HostCoinPaymentRefundRequest: Codec;\n/**\n * Error returned by the contact picker.\n *\n * Neither a dismissal nor an empty contact list is an error; both are outcomes.\n * A host that serves no picker at all answers `Unsupported` at the framework\n * level rather than through this enum.\n */\nexport type HostContactsPickError = \n/** No active session. */\n{\n tag: \"NotConnected\";\n value?: undefined;\n}\n/** Catch-all. */\n | {\n tag: \"Unknown\";\n value: {\n reason: string;\n };\n};\nexport const HostContactsPickError: Codec;\n/**\n * Request to open the host's contact picker.\n *\n * Carries no arguments: the host owns the overlay, draws it from its own chat\n * contacts, and nothing the product supplies appears in it.\n */\nexport interface HostContactsPickRequest {\n}\nexport const HostContactsPickRequest: Codec;\n/** Outcome of a pick. */\nexport interface HostContactsPickResponse {\n /** How the pick ended. */\n outcome: ContactPickOutcome;\n}\nexport const HostContactsPickResponse: Codec;\n/** Transaction creation error. */\nexport type HostCreateTransactionError = \n/** Payload could not be deserialized. */\n{\n tag: \"FailedToDecode\";\n value?: undefined;\n}\n/** User rejected. */\n | {\n tag: \"Rejected\";\n value?: undefined;\n}\n/** Unsupported payload version or extension. */\n | {\n tag: \"NotSupported\";\n value: {\n reason: string;\n };\n}\n/** Not authenticated. */\n | {\n tag: \"PermissionDenied\";\n value?: undefined;\n}\n/** Catch-all. */\n | {\n tag: \"Unknown\";\n value: {\n reason: string;\n };\n}\n/**\n * A declared contact handle names nobody this host has a contact for, or\n * does not appear in the call it was declared for, or a handle appears in\n * the call without being declared. One refusal for all three, because\n * telling them apart would say whether a handle is current.\n */\n | {\n tag: \"UnknownContact\";\n value?: undefined;\n};\nexport const HostCreateTransactionError: Codec;\n/** Response containing a created transaction. */\nexport interface HostCreateTransactionResponse {\n /**\n * SCALE-encoded transaction, signed unless the request supplied its own\n * V5 `VerifyMultiSignature` extension.\n */\n transaction: HexString;\n}\nexport const HostCreateTransactionResponse: Codec;\n/** Response containing a transaction created with a non-product account. */\nexport interface HostCreateTransactionWithLegacyAccountResponse {\n /**\n * SCALE-encoded transaction, signed unless the request supplied its own\n * V5 `VerifyMultiSignature` extension.\n */\n transaction: HexString;\n}\nexport const HostCreateTransactionWithLegacyAccountResponse: Codec;\n/** Error from [`crate::api::Entropy::derive`] (RFC 0007). */\nexport type HostDeriveEntropyError = \n/** Catch-all. */\n{\n tag: \"Unknown\";\n value: {\n reason: string;\n };\n};\nexport const HostDeriveEntropyError: Codec;\n/**\n * Request to derive deterministic per-product entropy (RFC 0007).\n *\n * The host derives 32 bytes from product-scoped seed material and `context`.\n * Repeated calls with the same `context` for the same product yield the same\n * entropy.\n */\nexport interface HostDeriveEntropyRequest {\n /** Domain-separated derivation context. */\n context: HexString;\n}\nexport const HostDeriveEntropyRequest: Codec;\n/** Response carrying 32 bytes of deterministically derived entropy. */\nexport interface HostDeriveEntropyResponse {\n /** 32 bytes of derived entropy. */\n entropy: HexString;\n}\nexport const HostDeriveEntropyResponse: Codec;\n/**\n * Device-capability permission requested from the host (RFC 0002).\n *\n * Lasting grants and denials survive app restarts. A host may also offer a\n * one-use grant, held in memory until a permission-gated operation consumes it.\n *\n * That decision is about this product. The OS grant behind it belongs to the\n * host application and can move independently, so a host that can read OS\n * state has the capability resolve only while both allow it: a stored grant\n * whose OS grant was revoked answers `granted: false` without a prompt. An OS\n * grant that is merely undetermined does not change the answer, because the OS\n * resolves its own gate when the capability is used.\n */\nexport type HostDevicePermissionRequest = \"Notifications\" | \"Camera\" | \"Microphone\" | \"Bluetooth\" | \"NFC\" | \"Location\" | \"Clipboard\" | \"OpenUrl\" | \"Biometrics\";\nexport const HostDevicePermissionRequest: Codec;\n/** Outcome of a device-permission request. */\nexport interface HostDevicePermissionResponse {\n /** Whether the permission was granted. */\n granted: boolean;\n}\nexport const HostDevicePermissionResponse: Codec;\n/** Request to query whether a feature is supported by the host. */\nexport type HostFeatureSupportedRequest = \n/** Ask whether the host can interact with the chain identified by genesis hash. */\n{\n tag: \"Chain\";\n value: {\n genesisHash: HexString;\n };\n};\nexport const HostFeatureSupportedRequest: Codec;\n/** Response to a feature-support query. */\nexport interface HostFeatureSupportedResponse {\n /** Whether the feature is supported. */\n supported: boolean;\n}\nexport const HostFeatureSupportedResponse: Codec;\n/** Response containing all legacy (user-imported) accounts owned by the user. */\nexport interface HostGetLegacyAccountsResponse {\n /** Legacy accounts. */\n accounts: Array;\n}\nexport const HostGetLegacyAccountsResponse: Codec;\n/** Response containing the product context bound to the current host runtime. */\nexport interface HostGetProductContextResponse {\n /** Full canonical identifier used for authorization and account derivation. */\n productId: string;\n}\nexport const HostGetProductContextResponse: Codec;\n/** Error from [`crate::api::Account::get_user_id`]. */\nexport type HostGetUserIdError = \n/** User denied the identity disclosure request. */\n{\n tag: \"PermissionDenied\";\n value?: undefined;\n}\n/** User is not logged in. */\n | {\n tag: \"NotConnected\";\n value?: undefined;\n}\n/** Catch-all. */\n | {\n tag: \"Unknown\";\n value: {\n reason: string;\n };\n};\nexport const HostGetUserIdError: Codec;\n/** The user's primary DotNS account identity. */\nexport interface HostGetUserIdResponse {\n /** The user's primary DotNS username. */\n primaryUsername: string;\n}\nexport const HostGetUserIdResponse: Codec;\n/**\n * Error from [`crate::api::System::handshake`] (RFC 0009).\n *\n * The handshake is the first call on a fresh connection; it does not require\n * user authentication and is used to negotiate the wire codec version.\n */\nexport type HostHandshakeError = \n/** Host did not complete the handshake in time. */\n{\n tag: \"Timeout\";\n value?: undefined;\n}\n/** Host does not speak the codec version requested by the product. */\n | {\n tag: \"UnsupportedProtocolVersion\";\n value?: undefined;\n}\n/** Catch-all. */\n | {\n tag: \"Unknown\";\n value: GenericError;\n};\nexport const HostHandshakeError: Codec;\n/** Wire-codec negotiation payload sent by the product (RFC 0009). */\nexport interface HostHandshakeRequest {\n /** Wire codec version requested by the product. */\n codecVersion: number;\n}\nexport const HostHandshakeRequest: Codec;\n/** A change to a subscribed storage key, pushed to the subscriber. */\nexport interface HostLocalStorageChangeItem {\n /** Value after the change. `Some` on write, `None` after clear. */\n value?: HexString;\n}\nexport const HostLocalStorageChangeItem: Codec;\n/** Request to clear a local storage key. */\nexport interface HostLocalStorageClearRequest {\n /** Storage key to clear. */\n key: string;\n}\nexport const HostLocalStorageClearRequest: Codec;\n/** Local storage operation error. */\nexport type V01HostLocalStorageReadError = \n/** Storage quota exceeded. */\n{\n tag: \"Full\";\n value?: undefined;\n}\n/** Catch-all. */\n | {\n tag: \"Unknown\";\n value: {\n reason: string;\n };\n};\nexport const V01HostLocalStorageReadError: Codec;\n/** Request to read a local storage value. */\nexport interface V01HostLocalStorageReadRequest {\n /** Storage key to read. */\n key: string;\n}\nexport const V01HostLocalStorageReadRequest: Codec;\n/** Response containing an optional local storage value. */\nexport interface HostLocalStorageReadResponse {\n /** Stored value, if present. */\n value?: HexString;\n}\nexport const HostLocalStorageReadResponse: Codec;\n/** Request to subscribe to changes of one local storage key. */\nexport interface HostLocalStorageSubscribeRequest {\n /** Storage key to observe. */\n key: string;\n}\nexport const HostLocalStorageSubscribeRequest: Codec;\n/** Request to write a value into local storage. */\nexport interface HostLocalStorageWriteRequest {\n /** Storage key to write. */\n key: string;\n /** Value to store at the key. */\n value: HexString;\n}\nexport const HostLocalStorageWriteRequest: Codec;\n/** Locale the host currently presents its interface in, pushed to subscribers. */\nexport interface V01HostLocaleSubscribeItem {\n /**\n * BCP 47 language tag, such as `en`, `pt-BR` or `zh-Hans`. The set is\n * open: a product that does not ship the tag chooses its own fallback.\n */\n languageTag: string;\n}\nexport const V01HostLocaleSubscribeItem: Codec;\n/** Error from [`crate::api::System::navigate_to`]. */\nexport type HostNavigateToError = \n/**\n * The target host is not authorized for outbound access: the user answered\n * no to the prompt, a stored decision already refused it, or no prompt\n * could be put to the user.\n */\n{\n tag: \"PermissionDenied\";\n value?: undefined;\n}\n/** Catch-all. */\n | {\n tag: \"Unknown\";\n value: {\n reason: string;\n };\n};\nexport const HostNavigateToError: Codec;\n/** Request to navigate the host to an external URL. */\nexport interface HostNavigateToRequest {\n /** URL to open. */\n url: string;\n}\nexport const HostNavigateToRequest: Codec;\n/**\n * Error from [`crate::api::Payment::balance_subscribe`].\n *\n * See [RFC 0006].\n *\n * [RFC 0006]: https://github.com/paritytech/triangle-js-sdks/pull/94\n */\nexport type HostPaymentBalanceSubscribeError = \n/** User denied the balance disclosure request. */\n{\n tag: \"PermissionDenied\";\n value?: undefined;\n}\n/** Catch-all. */\n | {\n tag: \"Unknown\";\n value: {\n reason: string;\n };\n};\nexport const HostPaymentBalanceSubscribeError: Codec;\n/**\n * Current payment balance state pushed to subscribers.\n *\n * See [RFC 0006].\n *\n * [RFC 0006]: https://github.com/paritytech/triangle-js-sdks/pull/94\n */\nexport interface HostPaymentBalanceSubscribeItem {\n /** Balance that can be spent right now. */\n available: bigint;\n}\nexport const HostPaymentBalanceSubscribeItem: Codec;\n/** Request to subscribe to payment balance updates. */\nexport interface HostPaymentBalanceSubscribeRequest {\n /** Optional purse selector. `None` means MAIN_PURSE. */\n purse?: number;\n}\nexport const HostPaymentBalanceSubscribeRequest: Codec;\n/**\n * Error from [`crate::api::Payment::request`].\n *\n * See [RFC 0006].\n *\n * [RFC 0006]: https://github.com/paritytech/triangle-js-sdks/pull/94\n */\nexport type HostPaymentError = \n/** User rejected the payment request. */\n{\n tag: \"Rejected\";\n value?: undefined;\n}\n/** User's available balance is not sufficient for the requested amount. */\n | {\n tag: \"InsufficientBalance\";\n value?: undefined;\n}\n/** Catch-all. */\n | {\n tag: \"Unknown\";\n value: {\n reason: string;\n };\n};\nexport const HostPaymentError: Codec;\n/** Request to initiate a payment to another account. */\nexport interface HostPaymentRequest {\n /** Optional purse selector. `None` means MAIN_PURSE. */\n from?: number;\n /** Amount to pay. */\n amount: bigint;\n /** Destination account. */\n destination: HexString;\n}\nexport const HostPaymentRequest: Codec;\n/**\n * Receipt returned after a successful payment request.\n *\n * See [RFC 0006].\n *\n * [RFC 0006]: https://github.com/paritytech/triangle-js-sdks/pull/94\n */\nexport interface HostPaymentResponse {\n /** The assigned payment identifier. */\n id: string;\n}\nexport const HostPaymentResponse: Codec;\n/**\n * Error from [`crate::api::Payment::status_subscribe`].\n *\n * See [RFC 0006].\n *\n * [RFC 0006]: https://github.com/paritytech/triangle-js-sdks/pull/94\n */\nexport type HostPaymentStatusSubscribeError = \n/** Payment ID was not found or does not belong to the current product. */\n{\n tag: \"PaymentNotFound\";\n value?: undefined;\n}\n/** Catch-all. */\n | {\n tag: \"Unknown\";\n value: {\n reason: string;\n };\n};\nexport const HostPaymentStatusSubscribeError: Codec;\n/**\n * Payment lifecycle status pushed to subscribers.\n *\n * Once a terminal state (`Completed` or `Failed`) is reached, the host\n * delivers it and may close the subscription.\n *\n * See [RFC 0006].\n *\n * [RFC 0006]: https://github.com/paritytech/triangle-js-sdks/pull/94\n */\nexport type HostPaymentStatusSubscribeItem = \n/** Payment is being processed. */\n{\n tag: \"Processing\";\n value?: undefined;\n}\n/** Payment has been settled successfully. */\n | {\n tag: \"Completed\";\n value?: undefined;\n}\n/** Payment has failed. */\n | {\n tag: \"Failed\";\n value: {\n reason: string;\n };\n};\nexport const HostPaymentStatusSubscribeItem: Codec;\n/** Request to subscribe to a payment status. */\nexport interface HostPaymentStatusSubscribeRequest {\n /** Payment identifier to watch. */\n paymentId: string;\n}\nexport const HostPaymentStatusSubscribeRequest: Codec;\n/**\n * Error from [`crate::api::Payment::top_up`].\n *\n * See [RFC 0006].\n *\n * [RFC 0006]: https://github.com/paritytech/triangle-js-sdks/pull/94\n */\nexport type HostPaymentTopUpError = \n/** The source account does not hold sufficient funds. */\n{\n tag: \"InsufficientFunds\";\n value?: undefined;\n}\n/** The source account was not found or is invalid. */\n | {\n tag: \"InvalidSource\";\n value?: undefined;\n}\n/** Some coins were claimed but the total fell short of the requested amount. */\n | {\n tag: \"PartialPayment\";\n value: {\n credited: bigint;\n };\n}\n/** Catch-all. */\n | {\n tag: \"Unknown\";\n value: {\n reason: string;\n };\n};\nexport const HostPaymentTopUpError: Codec;\n/** Request to top up the product payment balance. */\nexport interface HostPaymentTopUpRequest {\n /** Optional purse selector. `None` means MAIN_PURSE. */\n into?: number;\n /** Amount to top up. */\n amount: bigint;\n /** Funding source for the top-up. */\n source: PaymentTopUpSource;\n}\nexport const HostPaymentTopUpRequest: Codec;\n/** The calling product's cards: the whole set on subscribe and after every change. */\nexport interface HostPocketListSubscribeItem {\n /** Cards currently in Pocket for the calling product. */\n cards: Array;\n}\nexport const HostPocketListSubscribeItem: Codec;\n/** Card removal failure. */\nexport type HostPocketRemoveCardError = \n/** The card is privileged and stays in Pocket. */\n{\n tag: \"Privileged\";\n value?: undefined;\n}\n/** Catch-all. */\n | {\n tag: \"Unknown\";\n value: {\n reason: string;\n };\n};\nexport const HostPocketRemoveCardError: Codec;\n/** Request to remove one of the calling product's cards. */\nexport interface HostPocketRemoveCardRequest {\n /** Card to remove. A card that is not present is already removed. */\n cardId: string;\n}\nexport const HostPocketRemoveCardRequest: Codec;\n/** Request to cancel a previously scheduled notification. */\nexport interface HostPushNotificationCancelRequest {\n /** The notification identifier returned by [`HostPushNotificationResponse`]. */\n id: number;\n}\nexport const HostPushNotificationCancelRequest: Codec;\n/** Push notification error. */\nexport type HostPushNotificationError = \n/** The host-wide queue of pending scheduled notifications is full. */\n{\n tag: \"ScheduleLimitReached\";\n value?: undefined;\n}\n/** Catch-all. */\n | {\n tag: \"Unknown\";\n value: {\n reason: string;\n };\n};\nexport const HostPushNotificationError: Codec;\n/**\n * Push notification payload.\n *\n * When `scheduled_at` is `Some`, the notification is deferred to the given\n * wall-clock instant (Unix milliseconds UTC). `None` fires immediately,\n * preserving prior behaviour. See [RFC 0019].\n *\n * [RFC 0019]: https://github.com/paritytech/trinity-user-agents/blob/main/docs/rfcs/0019-scheduled-notifications.md\n */\nexport interface HostPushNotificationRequest {\n /** Notification text. */\n text: string;\n /** Optional URL to open on tap. */\n deeplink?: string;\n /**\n * Optional Unix timestamp in milliseconds (UTC) at which the notification\n * should fire. `None` fires immediately.\n */\n scheduledAt?: bigint;\n}\nexport const HostPushNotificationRequest: Codec;\n/** Successful push notification response carrying the assigned id. */\nexport interface HostPushNotificationResponse {\n /** Host-assigned notification identifier. */\n id: number;\n}\nexport const HostPushNotificationResponse: Codec;\n/** An action triggered inside a product-rendered body. */\nexport interface HostRendererActionSubscribeItem {\n /** Where the body lives. */\n context: RenderContext;\n /** Which action was triggered, as named in the renderer tree. */\n actionId: string;\n /**\n * Data the node attached to the action. A `Button` press carries an\n * empty payload; a `TextField` value change carries the UTF-8 bytes of\n * the new value, with no length prefix.\n */\n payload: HexString;\n}\nexport const HostRendererActionSubscribeItem: Codec;\n/** Login request error. */\nexport type HostRequestLoginError = \n/** Catch-all. */\n{\n tag: \"Unknown\";\n value: {\n reason: string;\n };\n};\nexport const HostRequestLoginError: Codec;\n/** Request to present the host login flow. */\nexport interface HostRequestLoginRequest {\n /** Optional human-readable reason shown in the login UI. */\n reason?: string;\n}\nexport const HostRequestLoginRequest: Codec;\n/** Result of a login request. */\nexport type HostRequestLoginResponse = \"Success\" | \"AlreadyConnected\" | \"Rejected\";\nexport const HostRequestLoginResponse: Codec;\n/** Batched resource pre-allocation request (RFC 0010). */\nexport interface HostRequestResourceAllocationRequest {\n /** Resources to allocate. */\n resources: Array;\n}\nexport const HostRequestResourceAllocationRequest: Codec;\n/** Per-resource outcomes for a batched allocation request (RFC 0010). */\nexport interface HostRequestResourceAllocationResponse {\n /** Per-resource allocation outcomes, in the same order as the request. */\n outcomes: Array;\n}\nexport const HostRequestResourceAllocationResponse: Codec;\n/** Signing operation error. */\nexport type HostSignPayloadError = \n/** Payload could not be deserialized. */\n{\n tag: \"FailedToDecode\";\n value?: undefined;\n}\n/** User rejected signing. */\n | {\n tag: \"Rejected\";\n value?: undefined;\n}\n/** Not authenticated. */\n | {\n tag: \"PermissionDenied\";\n value?: undefined;\n}\n/** Catch-all. */\n | {\n tag: \"Unknown\";\n value: {\n reason: string;\n };\n};\nexport const HostSignPayloadError: Codec;\n/** Request to sign an extrinsic payload with a product account. */\nexport interface HostSignPayloadRequest {\n /** Product account that will sign this payload. */\n account: ProductAccountId;\n /** The extrinsic payload to sign. */\n payload: HostSignPayloadData;\n}\nexport const HostSignPayloadRequest: Codec;\n/** Result of a signing operation. */\nexport interface HostSignPayloadResponse {\n /** The cryptographic signature. */\n signature: HexString;\n /** Full signed transaction, if requested. */\n signedTransaction?: HexString;\n}\nexport const HostSignPayloadResponse: Codec;\n/**\n * Sign a Substrate extrinsic payload with a non-product (legacy) account.\n * Contains the same fields as [`HostSignPayloadRequest`] minus `address`\n * (replaced by `signer`).\n */\nexport interface HostSignPayloadWithLegacyAccountRequest {\n /** Signer address (SS58 or hex) of the legacy account. */\n signer: string;\n /** The extrinsic payload to sign. */\n payload: HostSignPayloadData;\n}\nexport const HostSignPayloadWithLegacyAccountRequest: Codec;\n/** A raw signing request pairing an account with the payload to sign. */\nexport interface HostSignRawRequest {\n /** Product account that will sign this payload. */\n account: ProductAccountId;\n /** The payload to sign. */\n payload: RawPayload;\n}\nexport const HostSignRawRequest: Codec;\n/**\n * Sign raw bytes with a non-product (legacy) account. The signer field\n * identifies which legacy account to use.\n */\nexport interface HostSignRawWithLegacyAccountRequest {\n /** Signer address (SS58 or hex) of the legacy account. */\n signer: string;\n /** The data to sign. */\n payload: RawPayload;\n}\nexport const HostSignRawWithLegacyAccountRequest: Codec;\n/** Current theme state pushed to subscribers. */\nexport interface HostThemeSubscribeItem {\n /** Theme name. */\n name: ThemeName;\n /** Light or dark variant. */\n variant: ThemeVariant;\n}\nexport const HostThemeSubscribeItem: Codec;\n/** Request to begin a pending operation. */\nexport interface HostWorkerBeginOperationRequest {\n /** Optional label for host logs and UI. */\n label?: string;\n}\nexport const HostWorkerBeginOperationRequest: Codec;\n/** Response carrying the id of a newly begun operation. */\nexport interface HostWorkerBeginOperationResponse {\n /** Id to pass to `end_operation`. */\n id: number;\n}\nexport const HostWorkerBeginOperationResponse: Codec;\n/** Request to end a pending operation. */\nexport interface HostWorkerEndOperationRequest {\n /** Id returned by `begin_operation`. */\n id: number;\n}\nexport const HostWorkerEndOperationRequest: Codec;\n/** A body the host needs drawn. */\nexport interface ProductRendererRenderRequest {\n /** Where the body lives. */\n context: RenderContext;\n /** Product-defined payload, opaque to the host. */\n payload: HexString;\n}\nexport const ProductRendererRenderRequest: Codec;\n/** Request to fetch the body of a pinned block. */\nexport interface RemoteChainHeadBodyRequest {\n /** Chain genesis hash. */\n genesisHash: HexString;\n /** Follow subscription identifier. */\n followSubscriptionId: string;\n /** Block hash. */\n hash: HexString;\n}\nexport const RemoteChainHeadBodyRequest: Codec;\n/** Response to a body request; results arrive as follow events. */\nexport interface RemoteChainHeadBodyResponse {\n /** Started operation result. */\n operation: OperationStartedResult;\n}\nexport const RemoteChainHeadBodyResponse: Codec;\n/** Request to invoke a runtime call at a pinned block. */\nexport interface RemoteChainHeadCallRequest {\n /** Chain genesis hash. */\n genesisHash: HexString;\n /** Follow subscription identifier. */\n followSubscriptionId: string;\n /** Block hash. */\n hash: HexString;\n /** Runtime API function name. */\n function: string;\n /** SCALE-encoded call parameters. */\n callParameters: HexString;\n}\nexport const RemoteChainHeadCallRequest: Codec;\n/** Response to a runtime call request; the output arrives as a follow event. */\nexport interface RemoteChainHeadCallResponse {\n /** Started operation result. */\n operation: OperationStartedResult;\n}\nexport const RemoteChainHeadCallResponse: Codec;\n/** Request to continue a paused chain-head operation. */\nexport interface RemoteChainHeadContinueRequest {\n /** Chain genesis hash. */\n genesisHash: HexString;\n /** Follow subscription identifier. */\n followSubscriptionId: string;\n /** Operation identifier. */\n operationId: string;\n}\nexport const RemoteChainHeadContinueRequest: Codec;\n/** Event emitted on a chain-head follow subscription. */\nexport type RemoteChainHeadFollowItem = \n/** First event of the subscription, describing the current finalized blocks. */\n{\n tag: \"Initialized\";\n value: {\n finalizedBlockHashes: Array;\n finalizedBlockRuntime?: RuntimeType;\n };\n}\n/** A new non-finalized block was announced. */\n | {\n tag: \"NewBlock\";\n value: {\n blockHash: HexString;\n parentBlockHash: HexString;\n newRuntime?: RuntimeType;\n };\n}\n/** The best block has changed. */\n | {\n tag: \"BestBlockChanged\";\n value: {\n bestBlockHash: HexString;\n };\n}\n/** One or more blocks were finalized. */\n | {\n tag: \"Finalized\";\n value: {\n finalizedBlockHashes: Array;\n prunedBlockHashes: Array;\n };\n}\n/** A body operation completed. */\n | {\n tag: \"OperationBodyDone\";\n value: {\n operationId: string;\n value: Array;\n };\n}\n/** A runtime call operation completed. */\n | {\n tag: \"OperationCallDone\";\n value: {\n operationId: string;\n output: HexString;\n };\n}\n/** A storage operation produced a batch of results. */\n | {\n tag: \"OperationStorageItems\";\n value: {\n operationId: string;\n items: Array;\n };\n}\n/** A storage operation finished emitting results. */\n | {\n tag: \"OperationStorageDone\";\n value: {\n operationId: string;\n };\n}\n/** A storage operation is paused until the product requests continuation. */\n | {\n tag: \"OperationWaitingForContinue\";\n value: {\n operationId: string;\n };\n}\n/** The operation failed because the required data was not accessible; it can be retried. */\n | {\n tag: \"OperationInaccessible\";\n value: {\n operationId: string;\n };\n}\n/** The operation failed with an error. */\n | {\n tag: \"OperationError\";\n value: {\n operationId: string;\n error: string;\n };\n}\n/** The subscription was stopped by the host and is no longer valid. */\n | {\n tag: \"Stop\";\n value?: undefined;\n};\nexport const RemoteChainHeadFollowItem: Codec;\n/** Request to start a chain-head follow subscription. */\nexport interface RemoteChainHeadFollowRequest {\n /** Chain genesis hash. */\n genesisHash: HexString;\n /** Whether to include runtime information in events. */\n withRuntime: boolean;\n}\nexport const RemoteChainHeadFollowRequest: Codec;\n/** Request to fetch the header of a pinned block. */\nexport interface RemoteChainHeadHeaderRequest {\n /** Chain genesis hash. */\n genesisHash: HexString;\n /** Follow subscription identifier. */\n followSubscriptionId: string;\n /** Block hash. */\n hash: HexString;\n}\nexport const RemoteChainHeadHeaderRequest: Codec;\n/** Response containing the requested block header. */\nexport interface RemoteChainHeadHeaderResponse {\n /** SCALE-encoded block header. */\n header?: HexString;\n}\nexport const RemoteChainHeadHeaderResponse: Codec;\n/** Request to stop an in-progress chain-head operation. */\nexport interface RemoteChainHeadStopOperationRequest {\n /** Chain genesis hash. */\n genesisHash: HexString;\n /** Follow subscription identifier. */\n followSubscriptionId: string;\n /** Operation identifier. */\n operationId: string;\n}\nexport const RemoteChainHeadStopOperationRequest: Codec;\n/** Request to query storage at a pinned block. */\nexport interface RemoteChainHeadStorageRequest {\n /** Chain genesis hash. */\n genesisHash: HexString;\n /** Follow subscription identifier. */\n followSubscriptionId: string;\n /** Block hash. */\n hash: HexString;\n /** Storage items to query. */\n items: Array;\n /** Optional child trie. */\n childTrie?: HexString;\n}\nexport const RemoteChainHeadStorageRequest: Codec;\n/** Response to a storage request; results arrive as follow events. */\nexport interface RemoteChainHeadStorageResponse {\n /** Started operation result. */\n operation: OperationStartedResult;\n}\nexport const RemoteChainHeadStorageResponse: Codec;\n/** Request to release pinned blocks. */\nexport interface RemoteChainHeadUnpinRequest {\n /** Chain genesis hash. */\n genesisHash: HexString;\n /** Follow subscription identifier. */\n followSubscriptionId: string;\n /** Block hashes to unpin. */\n hashes: Array;\n}\nexport const RemoteChainHeadUnpinRequest: Codec;\n/** Error from [`crate::api::Chain::get_chain_info`]. */\nexport type RemoteChainInfoError = \n/** The host does not serve the requested chain. */\n{\n tag: \"NotSupported\";\n value?: undefined;\n}\n/** Catch-all. */\n | {\n tag: \"Unknown\";\n value: GenericError;\n};\nexport const RemoteChainInfoError: Codec;\n/** Request to resolve one chain identifier against the host's environment. */\nexport interface RemoteChainInfoRequest {\n /** Chain to resolve. */\n chain: ChainIdentifier;\n}\nexport const RemoteChainInfoRequest: Codec;\n/** Response carrying the resolved chain data. */\nexport interface RemoteChainInfoResponse {\n /** Ecosystem the host is configured for, e.g. \"polkadot\", \"kusama\", \"paseo\". */\n network: string;\n /** Chain this response resolves, echoed from the request. */\n chain: ChainIdentifier;\n /** Genesis hash identifying the chain in all chain-scoped calls. */\n genesisHash: HexString;\n}\nexport const RemoteChainInfoResponse: Codec;\n/** Request for the display name of a chain. */\nexport interface RemoteChainSpecChainNameRequest {\n /** Chain genesis hash. */\n genesisHash: HexString;\n}\nexport const RemoteChainSpecChainNameRequest: Codec;\n/** Response containing the chain display name. */\nexport interface RemoteChainSpecChainNameResponse {\n /** Chain display name. */\n chainName: string;\n}\nexport const RemoteChainSpecChainNameResponse: Codec;\n/** Request for the canonical genesis hash of a chain. */\nexport interface RemoteChainSpecGenesisHashRequest {\n /** Chain genesis hash requested by the product. */\n genesisHash: HexString;\n}\nexport const RemoteChainSpecGenesisHashRequest: Codec;\n/** Response containing the canonical genesis hash. */\nexport interface RemoteChainSpecGenesisHashResponse {\n /** Chain genesis hash. */\n genesisHash: HexString;\n}\nexport const RemoteChainSpecGenesisHashResponse: Codec;\n/** Request for the JSON-encoded properties of a chain. */\nexport interface RemoteChainSpecPropertiesRequest {\n /** Chain genesis hash. */\n genesisHash: HexString;\n}\nexport const RemoteChainSpecPropertiesRequest: Codec;\n/** Response containing the chain properties. */\nexport interface RemoteChainSpecPropertiesResponse {\n /** JSON-encoded properties. */\n properties: string;\n}\nexport const RemoteChainSpecPropertiesResponse: Codec;\n/** Request to broadcast a signed transaction. */\nexport interface RemoteChainTransactionBroadcastRequest {\n /** Chain genesis hash. */\n genesisHash: HexString;\n /** Signed transaction bytes. */\n transaction: HexString;\n}\nexport const RemoteChainTransactionBroadcastRequest: Codec;\n/** Response to a transaction broadcast request. */\nexport interface RemoteChainTransactionBroadcastResponse {\n /** Broadcast operation identifier, if available. */\n operationId?: string;\n}\nexport const RemoteChainTransactionBroadcastResponse: Codec;\n/** Request to stop broadcasting a transaction. */\nexport interface RemoteChainTransactionStopRequest {\n /** Chain genesis hash. */\n genesisHash: HexString;\n /** Operation identifier of the broadcast to stop. */\n operationId: string;\n}\nexport const RemoteChainTransactionStopRequest: Codec;\n/** remote-permission request (RFC 0002). */\nexport interface RemotePermissionRequest {\n /** Permission requested by the product. */\n permission: RemotePermission;\n}\nexport const RemotePermissionRequest: Codec;\n/** Outcome of a remote-permission request. */\nexport interface RemotePermissionResponse {\n /** Whether the permission was granted. */\n granted: boolean;\n}\nexport const RemotePermissionResponse: Codec;\n/** Item containing an optional preimage lookup result. */\nexport interface RemotePreimageLookupSubscribeItem {\n /** Preimage data, if found. */\n value?: HexString;\n}\nexport const RemotePreimageLookupSubscribeItem: Codec;\n/** Request to subscribe to preimage lookup results. */\nexport interface RemotePreimageLookupSubscribeRequest {\n /** Hash of the preimage. */\n key: HexString;\n}\nexport const RemotePreimageLookupSubscribeRequest: Codec;\n/** Statement proof creation error. */\nexport type RemoteStatementStoreCreateProofError = \n/** Signing operation failed. */\n{\n tag: \"UnableToSign\";\n value?: undefined;\n}\n/** Account not recognized. */\n | {\n tag: \"UnknownAccount\";\n value?: undefined;\n}\n/** Catch-all. */\n | {\n tag: \"Unknown\";\n value: {\n reason: string;\n };\n};\nexport const RemoteStatementStoreCreateProofError: Codec;\n/** Request to create a cryptographic proof for a statement. */\nexport interface RemoteStatementStoreCreateProofRequest {\n /** Product account that should create the proof. */\n productAccountId: ProductAccountId;\n /** Statement to prove. */\n statement: Statement;\n}\nexport const RemoteStatementStoreCreateProofRequest: Codec;\n/** Response containing a statement proof. */\nexport interface RemoteStatementStoreCreateProofResponse {\n /** Created statement proof. */\n proof: StatementProof;\n}\nexport const RemoteStatementStoreCreateProofResponse: Codec;\n/**\n * Page of signed statements delivered by the statement store subscription\n * (RFC 0008). The `is_complete` flag distinguishes the historical-dump phase\n * (`false`) from the live-update phase (`true`).\n */\nexport interface RemoteStatementStoreSubscribeItem {\n /** Signed statements matching the subscription. */\n statements: Array;\n /**\n * `false` while the host is still streaming the historical dump (more\n * pages to follow). `true` once the dump is complete; all subsequent\n * pages are also `true` and carry only newly-arrived statements.\n */\n isComplete: boolean;\n}\nexport const RemoteStatementStoreSubscribeItem: Codec;\n/** Request to subscribe to statements via a topic filter (RFC 0008). */\nexport type RemoteStatementStoreSubscribeRequest = \n/** AND: statement must contain every listed topic. */\n{\n tag: \"MatchAll\";\n value: Array;\n}\n/** OR: statement must contain at least one listed topic. */\n | {\n tag: \"MatchAny\";\n value: Array;\n};\nexport const RemoteStatementStoreSubscribeRequest: Codec;\n/** Local storage read failure. */\nexport type HostLocalStorageReadError = \n/** Storage quota exceeded. */\n{\n tag: \"Full\";\n value?: undefined;\n}\n/**\n * The addressed storage belongs to another product that has not granted\n * this caller the `storage` scope.\n *\n * One variant answers every reason: the product does not resolve, it\n * published no manifest, or its manifest grants this caller nothing.\n * Distinguishing them would make the call a probe for which products exist\n * and which hold data.\n */\n | {\n tag: \"AccessNotGranted\";\n value?: undefined;\n}\n/** Catch-all. */\n | {\n tag: \"Unknown\";\n value: {\n reason: string;\n };\n};\nexport const HostLocalStorageReadError: Codec;\n/**\n * Request to read a local storage value.\n *\n * Storage is private by default: `product: None` addresses the caller's own\n * storage, which is what every v0.1 read resolved to. Naming another product\n * reads that product's storage instead, and succeeds only if that product's\n * manifest grants this caller the `storage` scope.\n */\nexport interface HostLocalStorageReadRequest {\n /**\n * Product whose storage is read. `None`, or the caller's own id, means the\n * caller, and consults no grant.\n */\n product?: string;\n /** Storage key to read. */\n key: string;\n}\nexport const HostLocalStorageReadRequest: Codec;\n/** Convert UTC instants using a snapshot of the host's locale subscription. */\nexport interface HostLocaleLocalizeTimestampsRequest {\n /** At most 128 Unix millisecond instants, no later than year 9999. */\n timestampsMs: Array;\n /** Language tag from the locale subscription, not a guessed language. */\n languageTag: string;\n /** Time zone from the locale subscription; evaluated separately at each instant. */\n timeZone: string;\n}\nexport const HostLocaleLocalizeTimestampsRequest: Codec;\n/** Local timestamps in exactly the request's order. */\nexport interface HostLocaleLocalizeTimestampsResponse {\n /** One result per requested timestamp; partial success is not returned. */\n timestamps: Array;\n}\nexport const HostLocaleLocalizeTimestampsResponse: Codec;\n/** Host language and local time zone, replaced together when either changes. */\nexport interface HostLocaleSubscribeItem {\n /** BCP 47 language tag selected by the host. */\n languageTag: string;\n /** IANA time zone, or absent when the host cannot supply local time. */\n timeZone?: string;\n}\nexport const HostLocaleSubscribeItem: Codec;\n/** Cross-axis alignment of `Row` children. */\nexport type VerticalAlignment = \"Top\" | \"Center\" | \"Bottom\";\nexport const VerticalAlignment: Codec;\n/** An sr25519 (schnorrkel) VRF signature: the VRF pre-output and its proof. */\nexport interface VrfSignature {\n /** schnorrkel `VRFPreOut` \u2014 the 32-byte VRF output point. */\n preOutput: HexString;\n /** schnorrkel `VRFProof` \u2014 the 64-byte DLEQ proof. */\n proof: HexString;\n}\nexport const VrfSignature: Codec;\n/** One `append_message` call replayed against the signing transcript. */\nexport interface VrfTranscriptItem {\n /** Merlin `append_message` label. */\n label: HexString;\n /** Merlin `append_message` value. */\n value: HexString;\n}\nexport const VrfTranscriptItem: Codec;\n\n}\n\n\n// re-export namespace T at module top level (mirrors index.d.ts `export *`)\n\nexport import ActionTrigger = T.ActionTrigger;\nexport import AllocatableResource = T.AllocatableResource;\nexport import AllocationOutcome = T.AllocationOutcome;\nexport import Arrangement = T.Arrangement;\nexport import Background = T.Background;\nexport import BlendingMode = T.BlendingMode;\nexport import BorderStyle = T.BorderStyle;\nexport import BoxProps = T.BoxProps;\nexport import ButtonProps = T.ButtonProps;\nexport import ButtonVariant = T.ButtonVariant;\nexport import Bytes32 = T.Bytes32;\nexport import ChainIdentifier = T.ChainIdentifier;\nexport import ChatAction = T.ChatAction;\nexport import ChatActionLayout = T.ChatActionLayout;\nexport import ChatActionPayload = T.ChatActionPayload;\nexport import ChatActions = T.ChatActions;\nexport import ChatBotRegistrationStatus = T.ChatBotRegistrationStatus;\nexport import ChatCommand = T.ChatCommand;\nexport import ChatCustomMessage = T.ChatCustomMessage;\nexport import ChatFile = T.ChatFile;\nexport import ChatMedia = T.ChatMedia;\nexport import ChatMessageContent = T.ChatMessageContent;\nexport import ChatReaction = T.ChatReaction;\nexport import ChatRichText = T.ChatRichText;\nexport import ChatRoom = T.ChatRoom;\nexport import ChatRoomParticipation = T.ChatRoomParticipation;\nexport import ChatRoomRegistrationStatus = T.ChatRoomRegistrationStatus;\nexport import CoinPaymentCheque = T.CoinPaymentCheque;\nexport import CoinPaymentClearingReference = T.CoinPaymentClearingReference;\nexport import CoinPaymentError = T.CoinPaymentError;\nexport import CoinPaymentPurseInfo = T.CoinPaymentPurseInfo;\nexport import CoinPaymentStatus = T.CoinPaymentStatus;\nexport import CoinPaymentTransmissionChannel = T.CoinPaymentTransmissionChannel;\nexport import ColorToken = T.ColorToken;\nexport import ColumnProps = T.ColumnProps;\nexport import ContactHandle = T.ContactHandle;\nexport import ContactPickOutcome = T.ContactPickOutcome;\nexport import ContentAlignment = T.ContentAlignment;\nexport import ContextualAlias = T.ContextualAlias;\nexport import DerivationIndex = T.DerivationIndex;\nexport import Dimensions = T.Dimensions;\nexport import Effect = T.Effect;\nexport import EffectProps = T.EffectProps;\nexport import GenericError = T.GenericError;\nexport import HorizontalAlignment = T.HorizontalAlignment;\nexport import VersionedHostAccountConnectionStatusSubscribeError = T.VersionedHostAccountConnectionStatusSubscribeError;\nexport import VersionedHostAccountConnectionStatusSubscribeItem = T.VersionedHostAccountConnectionStatusSubscribeItem;\nexport import VersionedHostAccountConnectionStatusSubscribeRequest = T.VersionedHostAccountConnectionStatusSubscribeRequest;\nexport import VersionedHostAccountCreateProofError = T.VersionedHostAccountCreateProofError;\nexport import VersionedHostAccountCreateProofRequest = T.VersionedHostAccountCreateProofRequest;\nexport import VersionedHostAccountCreateProofResponse = T.VersionedHostAccountCreateProofResponse;\nexport import VersionedHostAccountGetAliasError = T.VersionedHostAccountGetAliasError;\nexport import VersionedHostAccountGetAliasRequest = T.VersionedHostAccountGetAliasRequest;\nexport import VersionedHostAccountGetAliasResponse = T.VersionedHostAccountGetAliasResponse;\nexport import VersionedHostAccountGetError = T.VersionedHostAccountGetError;\nexport import VersionedHostAccountGetRequest = T.VersionedHostAccountGetRequest;\nexport import VersionedHostAccountGetResponse = T.VersionedHostAccountGetResponse;\nexport import VersionedHostAccountListRingVrfKeysError = T.VersionedHostAccountListRingVrfKeysError;\nexport import VersionedHostAccountListRingVrfKeysRequest = T.VersionedHostAccountListRingVrfKeysRequest;\nexport import VersionedHostAccountListRingVrfKeysResponse = T.VersionedHostAccountListRingVrfKeysResponse;\nexport import VersionedHostAccountRegisterRingVrfKeyError = T.VersionedHostAccountRegisterRingVrfKeyError;\nexport import VersionedHostAccountRegisterRingVrfKeyRequest = T.VersionedHostAccountRegisterRingVrfKeyRequest;\nexport import VersionedHostAccountRegisterRingVrfKeyResponse = T.VersionedHostAccountRegisterRingVrfKeyResponse;\nexport import VersionedHostAccountRingVrfSignError = T.VersionedHostAccountRingVrfSignError;\nexport import VersionedHostAccountRingVrfSignRequest = T.VersionedHostAccountRingVrfSignRequest;\nexport import VersionedHostAccountRingVrfSignResponse = T.VersionedHostAccountRingVrfSignResponse;\nexport import VersionedHostAccountSignVrfError = T.VersionedHostAccountSignVrfError;\nexport import VersionedHostAccountSignVrfRequest = T.VersionedHostAccountSignVrfRequest;\nexport import VersionedHostAccountSignVrfResponse = T.VersionedHostAccountSignVrfResponse;\nexport import VersionedHostChatActionSubscribeError = T.VersionedHostChatActionSubscribeError;\nexport import VersionedHostChatActionSubscribeItem = T.VersionedHostChatActionSubscribeItem;\nexport import VersionedHostChatActionSubscribeRequest = T.VersionedHostChatActionSubscribeRequest;\nexport import VersionedHostChatCreateRoomError = T.VersionedHostChatCreateRoomError;\nexport import VersionedHostChatCreateRoomRequest = T.VersionedHostChatCreateRoomRequest;\nexport import VersionedHostChatCreateRoomResponse = T.VersionedHostChatCreateRoomResponse;\nexport import VersionedHostChatListSubscribeError = T.VersionedHostChatListSubscribeError;\nexport import VersionedHostChatListSubscribeItem = T.VersionedHostChatListSubscribeItem;\nexport import VersionedHostChatListSubscribeRequest = T.VersionedHostChatListSubscribeRequest;\nexport import VersionedHostChatPostMessageError = T.VersionedHostChatPostMessageError;\nexport import VersionedHostChatPostMessageRequest = T.VersionedHostChatPostMessageRequest;\nexport import VersionedHostChatPostMessageResponse = T.VersionedHostChatPostMessageResponse;\nexport import VersionedHostChatRegisterBotError = T.VersionedHostChatRegisterBotError;\nexport import VersionedHostChatRegisterBotRequest = T.VersionedHostChatRegisterBotRequest;\nexport import VersionedHostChatRegisterBotResponse = T.VersionedHostChatRegisterBotResponse;\nexport import VersionedHostCoinPaymentCreateChequeError = T.VersionedHostCoinPaymentCreateChequeError;\nexport import VersionedHostCoinPaymentCreateChequeRequest = T.VersionedHostCoinPaymentCreateChequeRequest;\nexport import VersionedHostCoinPaymentCreateChequeResponse = T.VersionedHostCoinPaymentCreateChequeResponse;\nexport import VersionedHostCoinPaymentCreatePurseError = T.VersionedHostCoinPaymentCreatePurseError;\nexport import VersionedHostCoinPaymentCreatePurseRequest = T.VersionedHostCoinPaymentCreatePurseRequest;\nexport import VersionedHostCoinPaymentCreatePurseResponse = T.VersionedHostCoinPaymentCreatePurseResponse;\nexport import VersionedHostCoinPaymentCreateReceivableError = T.VersionedHostCoinPaymentCreateReceivableError;\nexport import VersionedHostCoinPaymentCreateReceivableRequest = T.VersionedHostCoinPaymentCreateReceivableRequest;\nexport import VersionedHostCoinPaymentCreateReceivableResponse = T.VersionedHostCoinPaymentCreateReceivableResponse;\nexport import VersionedHostCoinPaymentDeletePurseError = T.VersionedHostCoinPaymentDeletePurseError;\nexport import VersionedHostCoinPaymentDeletePurseItem = T.VersionedHostCoinPaymentDeletePurseItem;\nexport import VersionedHostCoinPaymentDeletePurseRequest = T.VersionedHostCoinPaymentDeletePurseRequest;\nexport import VersionedHostCoinPaymentDepositError = T.VersionedHostCoinPaymentDepositError;\nexport import VersionedHostCoinPaymentDepositItem = T.VersionedHostCoinPaymentDepositItem;\nexport import VersionedHostCoinPaymentDepositRequest = T.VersionedHostCoinPaymentDepositRequest;\nexport import VersionedHostCoinPaymentListenForError = T.VersionedHostCoinPaymentListenForError;\nexport import VersionedHostCoinPaymentListenForItem = T.VersionedHostCoinPaymentListenForItem;\nexport import VersionedHostCoinPaymentListenForRequest = T.VersionedHostCoinPaymentListenForRequest;\nexport import VersionedHostCoinPaymentQueryPurseError = T.VersionedHostCoinPaymentQueryPurseError;\nexport import VersionedHostCoinPaymentQueryPurseRequest = T.VersionedHostCoinPaymentQueryPurseRequest;\nexport import VersionedHostCoinPaymentQueryPurseResponse = T.VersionedHostCoinPaymentQueryPurseResponse;\nexport import VersionedHostCoinPaymentRebalancePurseError = T.VersionedHostCoinPaymentRebalancePurseError;\nexport import VersionedHostCoinPaymentRebalancePurseItem = T.VersionedHostCoinPaymentRebalancePurseItem;\nexport import VersionedHostCoinPaymentRebalancePurseRequest = T.VersionedHostCoinPaymentRebalancePurseRequest;\nexport import VersionedHostCoinPaymentRefundError = T.VersionedHostCoinPaymentRefundError;\nexport import VersionedHostCoinPaymentRefundItem = T.VersionedHostCoinPaymentRefundItem;\nexport import VersionedHostCoinPaymentRefundRequest = T.VersionedHostCoinPaymentRefundRequest;\nexport import VersionedHostContactsPickError = T.VersionedHostContactsPickError;\nexport import VersionedHostContactsPickRequest = T.VersionedHostContactsPickRequest;\nexport import VersionedHostContactsPickResponse = T.VersionedHostContactsPickResponse;\nexport import VersionedHostCreateTransactionError = T.VersionedHostCreateTransactionError;\nexport import VersionedHostCreateTransactionRequest = T.VersionedHostCreateTransactionRequest;\nexport import VersionedHostCreateTransactionResponse = T.VersionedHostCreateTransactionResponse;\nexport import VersionedHostCreateTransactionWithLegacyAccountError = T.VersionedHostCreateTransactionWithLegacyAccountError;\nexport import VersionedHostCreateTransactionWithLegacyAccountRequest = T.VersionedHostCreateTransactionWithLegacyAccountRequest;\nexport import VersionedHostCreateTransactionWithLegacyAccountResponse = T.VersionedHostCreateTransactionWithLegacyAccountResponse;\nexport import VersionedHostDeriveEntropyError = T.VersionedHostDeriveEntropyError;\nexport import VersionedHostDeriveEntropyRequest = T.VersionedHostDeriveEntropyRequest;\nexport import VersionedHostDeriveEntropyResponse = T.VersionedHostDeriveEntropyResponse;\nexport import VersionedHostDevicePermissionError = T.VersionedHostDevicePermissionError;\nexport import VersionedHostDevicePermissionRequest = T.VersionedHostDevicePermissionRequest;\nexport import VersionedHostDevicePermissionResponse = T.VersionedHostDevicePermissionResponse;\nexport import VersionedHostFeatureSupportedError = T.VersionedHostFeatureSupportedError;\nexport import VersionedHostFeatureSupportedRequest = T.VersionedHostFeatureSupportedRequest;\nexport import VersionedHostFeatureSupportedResponse = T.VersionedHostFeatureSupportedResponse;\nexport import VersionedHostGetLegacyAccountsError = T.VersionedHostGetLegacyAccountsError;\nexport import VersionedHostGetLegacyAccountsRequest = T.VersionedHostGetLegacyAccountsRequest;\nexport import VersionedHostGetLegacyAccountsResponse = T.VersionedHostGetLegacyAccountsResponse;\nexport import VersionedHostGetProductContextError = T.VersionedHostGetProductContextError;\nexport import VersionedHostGetProductContextRequest = T.VersionedHostGetProductContextRequest;\nexport import VersionedHostGetProductContextResponse = T.VersionedHostGetProductContextResponse;\nexport import VersionedHostGetUserIdError = T.VersionedHostGetUserIdError;\nexport import VersionedHostGetUserIdRequest = T.VersionedHostGetUserIdRequest;\nexport import VersionedHostGetUserIdResponse = T.VersionedHostGetUserIdResponse;\nexport import VersionedHostHandshakeError = T.VersionedHostHandshakeError;\nexport import VersionedHostHandshakeRequest = T.VersionedHostHandshakeRequest;\nexport import VersionedHostHandshakeResponse = T.VersionedHostHandshakeResponse;\nexport import HostInfo = T.HostInfo;\nexport import VersionedHostInfoError = T.VersionedHostInfoError;\nexport import VersionedHostInfoRequest = T.VersionedHostInfoRequest;\nexport import VersionedHostInfoResponse = T.VersionedHostInfoResponse;\nexport import VersionedHostLocalStorageChangeItem = T.VersionedHostLocalStorageChangeItem;\nexport import VersionedHostLocalStorageClearError = T.VersionedHostLocalStorageClearError;\nexport import VersionedHostLocalStorageClearRequest = T.VersionedHostLocalStorageClearRequest;\nexport import VersionedHostLocalStorageClearResponse = T.VersionedHostLocalStorageClearResponse;\nexport import VersionedHostLocalStorageReadError = T.VersionedHostLocalStorageReadError;\nexport import VersionedHostLocalStorageReadRequest = T.VersionedHostLocalStorageReadRequest;\nexport import VersionedHostLocalStorageReadResponse = T.VersionedHostLocalStorageReadResponse;\nexport import VersionedHostLocalStorageSubscribeError = T.VersionedHostLocalStorageSubscribeError;\nexport import VersionedHostLocalStorageSubscribeRequest = T.VersionedHostLocalStorageSubscribeRequest;\nexport import VersionedHostLocalStorageWriteError = T.VersionedHostLocalStorageWriteError;\nexport import VersionedHostLocalStorageWriteRequest = T.VersionedHostLocalStorageWriteRequest;\nexport import VersionedHostLocalStorageWriteResponse = T.VersionedHostLocalStorageWriteResponse;\nexport import VersionedHostLocaleLocalizeTimestampsError = T.VersionedHostLocaleLocalizeTimestampsError;\nexport import VersionedHostLocaleLocalizeTimestampsRequest = T.VersionedHostLocaleLocalizeTimestampsRequest;\nexport import VersionedHostLocaleLocalizeTimestampsResponse = T.VersionedHostLocaleLocalizeTimestampsResponse;\nexport import HostLocaleLocalizedTimestamp = T.HostLocaleLocalizedTimestamp;\nexport import VersionedHostLocaleSubscribeError = T.VersionedHostLocaleSubscribeError;\nexport import VersionedHostLocaleSubscribeItem = T.VersionedHostLocaleSubscribeItem;\nexport import VersionedHostLocaleSubscribeRequest = T.VersionedHostLocaleSubscribeRequest;\nexport import VersionedHostNavigateToError = T.VersionedHostNavigateToError;\nexport import VersionedHostNavigateToRequest = T.VersionedHostNavigateToRequest;\nexport import VersionedHostNavigateToResponse = T.VersionedHostNavigateToResponse;\nexport import VersionedHostPaymentBalanceSubscribeError = T.VersionedHostPaymentBalanceSubscribeError;\nexport import VersionedHostPaymentBalanceSubscribeItem = T.VersionedHostPaymentBalanceSubscribeItem;\nexport import VersionedHostPaymentBalanceSubscribeRequest = T.VersionedHostPaymentBalanceSubscribeRequest;\nexport import VersionedHostPaymentError = T.VersionedHostPaymentError;\nexport import VersionedHostPaymentRequest = T.VersionedHostPaymentRequest;\nexport import VersionedHostPaymentResponse = T.VersionedHostPaymentResponse;\nexport import VersionedHostPaymentStatusSubscribeError = T.VersionedHostPaymentStatusSubscribeError;\nexport import VersionedHostPaymentStatusSubscribeItem = T.VersionedHostPaymentStatusSubscribeItem;\nexport import VersionedHostPaymentStatusSubscribeRequest = T.VersionedHostPaymentStatusSubscribeRequest;\nexport import VersionedHostPaymentTopUpError = T.VersionedHostPaymentTopUpError;\nexport import VersionedHostPaymentTopUpRequest = T.VersionedHostPaymentTopUpRequest;\nexport import VersionedHostPaymentTopUpResponse = T.VersionedHostPaymentTopUpResponse;\nexport import HostPlatform = T.HostPlatform;\nexport import VersionedHostPocketListSubscribeError = T.VersionedHostPocketListSubscribeError;\nexport import VersionedHostPocketListSubscribeItem = T.VersionedHostPocketListSubscribeItem;\nexport import VersionedHostPocketListSubscribeRequest = T.VersionedHostPocketListSubscribeRequest;\nexport import VersionedHostPocketRemoveCardError = T.VersionedHostPocketRemoveCardError;\nexport import VersionedHostPocketRemoveCardRequest = T.VersionedHostPocketRemoveCardRequest;\nexport import VersionedHostPocketRemoveCardResponse = T.VersionedHostPocketRemoveCardResponse;\nexport import VersionedHostPushNotificationCancelError = T.VersionedHostPushNotificationCancelError;\nexport import VersionedHostPushNotificationCancelRequest = T.VersionedHostPushNotificationCancelRequest;\nexport import VersionedHostPushNotificationCancelResponse = T.VersionedHostPushNotificationCancelResponse;\nexport import VersionedHostPushNotificationError = T.VersionedHostPushNotificationError;\nexport import VersionedHostPushNotificationRequest = T.VersionedHostPushNotificationRequest;\nexport import VersionedHostPushNotificationResponse = T.VersionedHostPushNotificationResponse;\nexport import VersionedHostRendererActionSubscribeError = T.VersionedHostRendererActionSubscribeError;\nexport import VersionedHostRendererActionSubscribeItem = T.VersionedHostRendererActionSubscribeItem;\nexport import VersionedHostRendererActionSubscribeRequest = T.VersionedHostRendererActionSubscribeRequest;\nexport import VersionedHostRequestLoginError = T.VersionedHostRequestLoginError;\nexport import VersionedHostRequestLoginRequest = T.VersionedHostRequestLoginRequest;\nexport import VersionedHostRequestLoginResponse = T.VersionedHostRequestLoginResponse;\nexport import VersionedHostRequestResourceAllocationError = T.VersionedHostRequestResourceAllocationError;\nexport import VersionedHostRequestResourceAllocationRequest = T.VersionedHostRequestResourceAllocationRequest;\nexport import VersionedHostRequestResourceAllocationResponse = T.VersionedHostRequestResourceAllocationResponse;\nexport import HostSignPayloadData = T.HostSignPayloadData;\nexport import VersionedHostSignPayloadError = T.VersionedHostSignPayloadError;\nexport import VersionedHostSignPayloadRequest = T.VersionedHostSignPayloadRequest;\nexport import VersionedHostSignPayloadResponse = T.VersionedHostSignPayloadResponse;\nexport import VersionedHostSignPayloadWithLegacyAccountError = T.VersionedHostSignPayloadWithLegacyAccountError;\nexport import VersionedHostSignPayloadWithLegacyAccountRequest = T.VersionedHostSignPayloadWithLegacyAccountRequest;\nexport import VersionedHostSignPayloadWithLegacyAccountResponse = T.VersionedHostSignPayloadWithLegacyAccountResponse;\nexport import VersionedHostSignRawError = T.VersionedHostSignRawError;\nexport import VersionedHostSignRawRequest = T.VersionedHostSignRawRequest;\nexport import VersionedHostSignRawResponse = T.VersionedHostSignRawResponse;\nexport import VersionedHostSignRawWithLegacyAccountError = T.VersionedHostSignRawWithLegacyAccountError;\nexport import VersionedHostSignRawWithLegacyAccountRequest = T.VersionedHostSignRawWithLegacyAccountRequest;\nexport import VersionedHostSignRawWithLegacyAccountResponse = T.VersionedHostSignRawWithLegacyAccountResponse;\nexport import VersionedHostThemeSubscribeError = T.VersionedHostThemeSubscribeError;\nexport import VersionedHostThemeSubscribeItem = T.VersionedHostThemeSubscribeItem;\nexport import VersionedHostThemeSubscribeRequest = T.VersionedHostThemeSubscribeRequest;\nexport import VersionedHostWorkerBeginOperationError = T.VersionedHostWorkerBeginOperationError;\nexport import VersionedHostWorkerBeginOperationRequest = T.VersionedHostWorkerBeginOperationRequest;\nexport import VersionedHostWorkerBeginOperationResponse = T.VersionedHostWorkerBeginOperationResponse;\nexport import VersionedHostWorkerEndOperationError = T.VersionedHostWorkerEndOperationError;\nexport import VersionedHostWorkerEndOperationRequest = T.VersionedHostWorkerEndOperationRequest;\nexport import VersionedHostWorkerEndOperationResponse = T.VersionedHostWorkerEndOperationResponse;\nexport import HostWorkerOperationError = T.HostWorkerOperationError;\nexport import ImageFit = T.ImageFit;\nexport import ImageProps = T.ImageProps;\nexport import ImageSource = T.ImageSource;\nexport import LegacyAccount = T.LegacyAccount;\nexport import LegacyAccountTxPayload = T.LegacyAccountTxPayload;\nexport import Modifier = T.Modifier;\nexport import OperationStartedResult = T.OperationStartedResult;\nexport import PaymentTopUpSource = T.PaymentTopUpSource;\nexport import PocketCard = T.PocketCard;\nexport import PreimageSubmitError = T.PreimageSubmitError;\nexport import ProductAccount = T.ProductAccount;\nexport import ProductAccountId = T.ProductAccountId;\nexport import ProductAccountTxPayload = T.ProductAccountTxPayload;\nexport import ProductProofContext = T.ProductProofContext;\nexport import VersionedProductRendererRenderError = T.VersionedProductRendererRenderError;\nexport import VersionedProductRendererRenderItem = T.VersionedProductRendererRenderItem;\nexport import VersionedProductRendererRenderRequest = T.VersionedProductRendererRenderRequest;\nexport import RawPayload = T.RawPayload;\nexport import RegisteredRingVrfKey = T.RegisteredRingVrfKey;\nexport import VersionedRemoteChainHeadBodyError = T.VersionedRemoteChainHeadBodyError;\nexport import VersionedRemoteChainHeadBodyRequest = T.VersionedRemoteChainHeadBodyRequest;\nexport import VersionedRemoteChainHeadBodyResponse = T.VersionedRemoteChainHeadBodyResponse;\nexport import VersionedRemoteChainHeadCallError = T.VersionedRemoteChainHeadCallError;\nexport import VersionedRemoteChainHeadCallRequest = T.VersionedRemoteChainHeadCallRequest;\nexport import VersionedRemoteChainHeadCallResponse = T.VersionedRemoteChainHeadCallResponse;\nexport import VersionedRemoteChainHeadContinueError = T.VersionedRemoteChainHeadContinueError;\nexport import VersionedRemoteChainHeadContinueRequest = T.VersionedRemoteChainHeadContinueRequest;\nexport import VersionedRemoteChainHeadContinueResponse = T.VersionedRemoteChainHeadContinueResponse;\nexport import VersionedRemoteChainHeadFollowError = T.VersionedRemoteChainHeadFollowError;\nexport import VersionedRemoteChainHeadFollowItem = T.VersionedRemoteChainHeadFollowItem;\nexport import VersionedRemoteChainHeadFollowRequest = T.VersionedRemoteChainHeadFollowRequest;\nexport import VersionedRemoteChainHeadHeaderError = T.VersionedRemoteChainHeadHeaderError;\nexport import VersionedRemoteChainHeadHeaderRequest = T.VersionedRemoteChainHeadHeaderRequest;\nexport import VersionedRemoteChainHeadHeaderResponse = T.VersionedRemoteChainHeadHeaderResponse;\nexport import VersionedRemoteChainHeadStopOperationError = T.VersionedRemoteChainHeadStopOperationError;\nexport import VersionedRemoteChainHeadStopOperationRequest = T.VersionedRemoteChainHeadStopOperationRequest;\nexport import VersionedRemoteChainHeadStopOperationResponse = T.VersionedRemoteChainHeadStopOperationResponse;\nexport import VersionedRemoteChainHeadStorageError = T.VersionedRemoteChainHeadStorageError;\nexport import VersionedRemoteChainHeadStorageRequest = T.VersionedRemoteChainHeadStorageRequest;\nexport import VersionedRemoteChainHeadStorageResponse = T.VersionedRemoteChainHeadStorageResponse;\nexport import VersionedRemoteChainHeadUnpinError = T.VersionedRemoteChainHeadUnpinError;\nexport import VersionedRemoteChainHeadUnpinRequest = T.VersionedRemoteChainHeadUnpinRequest;\nexport import VersionedRemoteChainHeadUnpinResponse = T.VersionedRemoteChainHeadUnpinResponse;\nexport import VersionedRemoteChainInfoError = T.VersionedRemoteChainInfoError;\nexport import VersionedRemoteChainInfoRequest = T.VersionedRemoteChainInfoRequest;\nexport import VersionedRemoteChainInfoResponse = T.VersionedRemoteChainInfoResponse;\nexport import VersionedRemoteChainSpecChainNameError = T.VersionedRemoteChainSpecChainNameError;\nexport import VersionedRemoteChainSpecChainNameRequest = T.VersionedRemoteChainSpecChainNameRequest;\nexport import VersionedRemoteChainSpecChainNameResponse = T.VersionedRemoteChainSpecChainNameResponse;\nexport import VersionedRemoteChainSpecGenesisHashError = T.VersionedRemoteChainSpecGenesisHashError;\nexport import VersionedRemoteChainSpecGenesisHashRequest = T.VersionedRemoteChainSpecGenesisHashRequest;\nexport import VersionedRemoteChainSpecGenesisHashResponse = T.VersionedRemoteChainSpecGenesisHashResponse;\nexport import VersionedRemoteChainSpecPropertiesError = T.VersionedRemoteChainSpecPropertiesError;\nexport import VersionedRemoteChainSpecPropertiesRequest = T.VersionedRemoteChainSpecPropertiesRequest;\nexport import VersionedRemoteChainSpecPropertiesResponse = T.VersionedRemoteChainSpecPropertiesResponse;\nexport import VersionedRemoteChainTransactionBroadcastError = T.VersionedRemoteChainTransactionBroadcastError;\nexport import VersionedRemoteChainTransactionBroadcastRequest = T.VersionedRemoteChainTransactionBroadcastRequest;\nexport import VersionedRemoteChainTransactionBroadcastResponse = T.VersionedRemoteChainTransactionBroadcastResponse;\nexport import VersionedRemoteChainTransactionStopError = T.VersionedRemoteChainTransactionStopError;\nexport import VersionedRemoteChainTransactionStopRequest = T.VersionedRemoteChainTransactionStopRequest;\nexport import VersionedRemoteChainTransactionStopResponse = T.VersionedRemoteChainTransactionStopResponse;\nexport import RemotePermission = T.RemotePermission;\nexport import VersionedRemotePermissionError = T.VersionedRemotePermissionError;\nexport import VersionedRemotePermissionRequest = T.VersionedRemotePermissionRequest;\nexport import VersionedRemotePermissionResponse = T.VersionedRemotePermissionResponse;\nexport import VersionedRemotePreimageLookupSubscribeError = T.VersionedRemotePreimageLookupSubscribeError;\nexport import VersionedRemotePreimageLookupSubscribeItem = T.VersionedRemotePreimageLookupSubscribeItem;\nexport import VersionedRemotePreimageLookupSubscribeRequest = T.VersionedRemotePreimageLookupSubscribeRequest;\nexport import VersionedRemotePreimageSubmitError = T.VersionedRemotePreimageSubmitError;\nexport import VersionedRemotePreimageSubmitRequest = T.VersionedRemotePreimageSubmitRequest;\nexport import VersionedRemotePreimageSubmitResponse = T.VersionedRemotePreimageSubmitResponse;\nexport import VersionedRemoteStatementStoreCreateProofAuthorizedError = T.VersionedRemoteStatementStoreCreateProofAuthorizedError;\nexport import VersionedRemoteStatementStoreCreateProofAuthorizedRequest = T.VersionedRemoteStatementStoreCreateProofAuthorizedRequest;\nexport import VersionedRemoteStatementStoreCreateProofAuthorizedResponse = T.VersionedRemoteStatementStoreCreateProofAuthorizedResponse;\nexport import VersionedRemoteStatementStoreCreateProofError = T.VersionedRemoteStatementStoreCreateProofError;\nexport import VersionedRemoteStatementStoreCreateProofRequest = T.VersionedRemoteStatementStoreCreateProofRequest;\nexport import VersionedRemoteStatementStoreCreateProofResponse = T.VersionedRemoteStatementStoreCreateProofResponse;\nexport import VersionedRemoteStatementStoreSubmitError = T.VersionedRemoteStatementStoreSubmitError;\nexport import VersionedRemoteStatementStoreSubmitRequest = T.VersionedRemoteStatementStoreSubmitRequest;\nexport import VersionedRemoteStatementStoreSubmitResponse = T.VersionedRemoteStatementStoreSubmitResponse;\nexport import VersionedRemoteStatementStoreSubscribeError = T.VersionedRemoteStatementStoreSubscribeError;\nexport import VersionedRemoteStatementStoreSubscribeItem = T.VersionedRemoteStatementStoreSubscribeItem;\nexport import VersionedRemoteStatementStoreSubscribeRequest = T.VersionedRemoteStatementStoreSubscribeRequest;\nexport import RenderContext = T.RenderContext;\nexport import RendererNode = T.RendererNode;\nexport import ResourceAllocationError = T.ResourceAllocationError;\nexport import RingLocation = T.RingLocation;\nexport import RingLocationJunction = T.RingLocationJunction;\nexport import RingVrfKeyDisclosure = T.RingVrfKeyDisclosure;\nexport import RowProps = T.RowProps;\nexport import RuntimeApi = T.RuntimeApi;\nexport import RuntimeSpec = T.RuntimeSpec;\nexport import RuntimeType = T.RuntimeType;\nexport import Shape = T.Shape;\nexport import SignedStatement = T.SignedStatement;\nexport import Size = T.Size;\nexport import Statement = T.Statement;\nexport import StatementProof = T.StatementProof;\nexport import StorageQueryItem = T.StorageQueryItem;\nexport import StorageQueryType = T.StorageQueryType;\nexport import StorageResultItem = T.StorageResultItem;\nexport import TextFieldProps = T.TextFieldProps;\nexport import TextProps = T.TextProps;\nexport import ThemeName = T.ThemeName;\nexport import ThemeVariant = T.ThemeVariant;\nexport import TxPayloadExtension = T.TxPayloadExtension;\nexport import TypographyStyle = T.TypographyStyle;\nexport import HostAccountConnectionStatusSubscribeItem = T.HostAccountConnectionStatusSubscribeItem;\nexport import HostAccountCreateProofError = T.HostAccountCreateProofError;\nexport import HostAccountCreateProofRequest = T.HostAccountCreateProofRequest;\nexport import HostAccountCreateProofResponse = T.HostAccountCreateProofResponse;\nexport import HostAccountGetAliasError = T.HostAccountGetAliasError;\nexport import HostAccountGetAliasRequest = T.HostAccountGetAliasRequest;\nexport import HostAccountGetError = T.HostAccountGetError;\nexport import HostAccountGetRequest = T.HostAccountGetRequest;\nexport import HostAccountGetResponse = T.HostAccountGetResponse;\nexport import HostAccountListRingVrfKeysError = T.HostAccountListRingVrfKeysError;\nexport import HostAccountListRingVrfKeysRequest = T.HostAccountListRingVrfKeysRequest;\nexport import HostAccountRegisterRingVrfKeyError = T.HostAccountRegisterRingVrfKeyError;\nexport import HostAccountRegisterRingVrfKeyRequest = T.HostAccountRegisterRingVrfKeyRequest;\nexport import HostAccountRingVrfSignError = T.HostAccountRingVrfSignError;\nexport import HostAccountRingVrfSignRequest = T.HostAccountRingVrfSignRequest;\nexport import HostAccountSignVrfError = T.HostAccountSignVrfError;\nexport import HostAccountSignVrfRequest = T.HostAccountSignVrfRequest;\nexport import HostChatActionSubscribeItem = T.HostChatActionSubscribeItem;\nexport import HostChatCreateRoomError = T.HostChatCreateRoomError;\nexport import HostChatCreateRoomRequest = T.HostChatCreateRoomRequest;\nexport import HostChatCreateRoomResponse = T.HostChatCreateRoomResponse;\nexport import HostChatListSubscribeItem = T.HostChatListSubscribeItem;\nexport import HostChatPostMessageError = T.HostChatPostMessageError;\nexport import HostChatPostMessageRequest = T.HostChatPostMessageRequest;\nexport import HostChatPostMessageResponse = T.HostChatPostMessageResponse;\nexport import HostChatRegisterBotError = T.HostChatRegisterBotError;\nexport import HostChatRegisterBotRequest = T.HostChatRegisterBotRequest;\nexport import HostChatRegisterBotResponse = T.HostChatRegisterBotResponse;\nexport import HostCoinPaymentCreateChequeRequest = T.HostCoinPaymentCreateChequeRequest;\nexport import HostCoinPaymentCreateChequeResponse = T.HostCoinPaymentCreateChequeResponse;\nexport import HostCoinPaymentCreatePurseRequest = T.HostCoinPaymentCreatePurseRequest;\nexport import HostCoinPaymentCreatePurseResponse = T.HostCoinPaymentCreatePurseResponse;\nexport import HostCoinPaymentCreateReceivableRequest = T.HostCoinPaymentCreateReceivableRequest;\nexport import HostCoinPaymentCreateReceivableResponse = T.HostCoinPaymentCreateReceivableResponse;\nexport import HostCoinPaymentDeletePurseRequest = T.HostCoinPaymentDeletePurseRequest;\nexport import HostCoinPaymentDepositRequest = T.HostCoinPaymentDepositRequest;\nexport import HostCoinPaymentListenForItem = T.HostCoinPaymentListenForItem;\nexport import HostCoinPaymentListenForRequest = T.HostCoinPaymentListenForRequest;\nexport import HostCoinPaymentQueryPurseRequest = T.HostCoinPaymentQueryPurseRequest;\nexport import HostCoinPaymentQueryPurseResponse = T.HostCoinPaymentQueryPurseResponse;\nexport import HostCoinPaymentRebalancePurseRequest = T.HostCoinPaymentRebalancePurseRequest;\nexport import HostCoinPaymentRefundRequest = T.HostCoinPaymentRefundRequest;\nexport import HostContactsPickError = T.HostContactsPickError;\nexport import HostContactsPickRequest = T.HostContactsPickRequest;\nexport import HostContactsPickResponse = T.HostContactsPickResponse;\nexport import HostCreateTransactionError = T.HostCreateTransactionError;\nexport import HostCreateTransactionResponse = T.HostCreateTransactionResponse;\nexport import HostCreateTransactionWithLegacyAccountResponse = T.HostCreateTransactionWithLegacyAccountResponse;\nexport import HostDeriveEntropyError = T.HostDeriveEntropyError;\nexport import HostDeriveEntropyRequest = T.HostDeriveEntropyRequest;\nexport import HostDeriveEntropyResponse = T.HostDeriveEntropyResponse;\nexport import HostDevicePermissionRequest = T.HostDevicePermissionRequest;\nexport import HostDevicePermissionResponse = T.HostDevicePermissionResponse;\nexport import HostFeatureSupportedRequest = T.HostFeatureSupportedRequest;\nexport import HostFeatureSupportedResponse = T.HostFeatureSupportedResponse;\nexport import HostGetLegacyAccountsResponse = T.HostGetLegacyAccountsResponse;\nexport import HostGetProductContextResponse = T.HostGetProductContextResponse;\nexport import HostGetUserIdError = T.HostGetUserIdError;\nexport import HostGetUserIdResponse = T.HostGetUserIdResponse;\nexport import HostHandshakeError = T.HostHandshakeError;\nexport import HostHandshakeRequest = T.HostHandshakeRequest;\nexport import HostLocalStorageChangeItem = T.HostLocalStorageChangeItem;\nexport import HostLocalStorageClearRequest = T.HostLocalStorageClearRequest;\nexport import V01HostLocalStorageReadError = T.V01HostLocalStorageReadError;\nexport import V01HostLocalStorageReadRequest = T.V01HostLocalStorageReadRequest;\nexport import HostLocalStorageReadResponse = T.HostLocalStorageReadResponse;\nexport import HostLocalStorageSubscribeRequest = T.HostLocalStorageSubscribeRequest;\nexport import HostLocalStorageWriteRequest = T.HostLocalStorageWriteRequest;\nexport import V01HostLocaleSubscribeItem = T.V01HostLocaleSubscribeItem;\nexport import HostNavigateToError = T.HostNavigateToError;\nexport import HostNavigateToRequest = T.HostNavigateToRequest;\nexport import HostPaymentBalanceSubscribeError = T.HostPaymentBalanceSubscribeError;\nexport import HostPaymentBalanceSubscribeItem = T.HostPaymentBalanceSubscribeItem;\nexport import HostPaymentBalanceSubscribeRequest = T.HostPaymentBalanceSubscribeRequest;\nexport import HostPaymentError = T.HostPaymentError;\nexport import HostPaymentRequest = T.HostPaymentRequest;\nexport import HostPaymentResponse = T.HostPaymentResponse;\nexport import HostPaymentStatusSubscribeError = T.HostPaymentStatusSubscribeError;\nexport import HostPaymentStatusSubscribeItem = T.HostPaymentStatusSubscribeItem;\nexport import HostPaymentStatusSubscribeRequest = T.HostPaymentStatusSubscribeRequest;\nexport import HostPaymentTopUpError = T.HostPaymentTopUpError;\nexport import HostPaymentTopUpRequest = T.HostPaymentTopUpRequest;\nexport import HostPocketListSubscribeItem = T.HostPocketListSubscribeItem;\nexport import HostPocketRemoveCardError = T.HostPocketRemoveCardError;\nexport import HostPocketRemoveCardRequest = T.HostPocketRemoveCardRequest;\nexport import HostPushNotificationCancelRequest = T.HostPushNotificationCancelRequest;\nexport import HostPushNotificationError = T.HostPushNotificationError;\nexport import HostPushNotificationRequest = T.HostPushNotificationRequest;\nexport import HostPushNotificationResponse = T.HostPushNotificationResponse;\nexport import HostRendererActionSubscribeItem = T.HostRendererActionSubscribeItem;\nexport import HostRequestLoginError = T.HostRequestLoginError;\nexport import HostRequestLoginRequest = T.HostRequestLoginRequest;\nexport import HostRequestLoginResponse = T.HostRequestLoginResponse;\nexport import HostRequestResourceAllocationRequest = T.HostRequestResourceAllocationRequest;\nexport import HostRequestResourceAllocationResponse = T.HostRequestResourceAllocationResponse;\nexport import HostSignPayloadError = T.HostSignPayloadError;\nexport import HostSignPayloadRequest = T.HostSignPayloadRequest;\nexport import HostSignPayloadResponse = T.HostSignPayloadResponse;\nexport import HostSignPayloadWithLegacyAccountRequest = T.HostSignPayloadWithLegacyAccountRequest;\nexport import HostSignRawRequest = T.HostSignRawRequest;\nexport import HostSignRawWithLegacyAccountRequest = T.HostSignRawWithLegacyAccountRequest;\nexport import HostThemeSubscribeItem = T.HostThemeSubscribeItem;\nexport import HostWorkerBeginOperationRequest = T.HostWorkerBeginOperationRequest;\nexport import HostWorkerBeginOperationResponse = T.HostWorkerBeginOperationResponse;\nexport import HostWorkerEndOperationRequest = T.HostWorkerEndOperationRequest;\nexport import ProductRendererRenderRequest = T.ProductRendererRenderRequest;\nexport import RemoteChainHeadBodyRequest = T.RemoteChainHeadBodyRequest;\nexport import RemoteChainHeadBodyResponse = T.RemoteChainHeadBodyResponse;\nexport import RemoteChainHeadCallRequest = T.RemoteChainHeadCallRequest;\nexport import RemoteChainHeadCallResponse = T.RemoteChainHeadCallResponse;\nexport import RemoteChainHeadContinueRequest = T.RemoteChainHeadContinueRequest;\nexport import RemoteChainHeadFollowItem = T.RemoteChainHeadFollowItem;\nexport import RemoteChainHeadFollowRequest = T.RemoteChainHeadFollowRequest;\nexport import RemoteChainHeadHeaderRequest = T.RemoteChainHeadHeaderRequest;\nexport import RemoteChainHeadHeaderResponse = T.RemoteChainHeadHeaderResponse;\nexport import RemoteChainHeadStopOperationRequest = T.RemoteChainHeadStopOperationRequest;\nexport import RemoteChainHeadStorageRequest = T.RemoteChainHeadStorageRequest;\nexport import RemoteChainHeadStorageResponse = T.RemoteChainHeadStorageResponse;\nexport import RemoteChainHeadUnpinRequest = T.RemoteChainHeadUnpinRequest;\nexport import RemoteChainInfoError = T.RemoteChainInfoError;\nexport import RemoteChainInfoRequest = T.RemoteChainInfoRequest;\nexport import RemoteChainInfoResponse = T.RemoteChainInfoResponse;\nexport import RemoteChainSpecChainNameRequest = T.RemoteChainSpecChainNameRequest;\nexport import RemoteChainSpecChainNameResponse = T.RemoteChainSpecChainNameResponse;\nexport import RemoteChainSpecGenesisHashRequest = T.RemoteChainSpecGenesisHashRequest;\nexport import RemoteChainSpecGenesisHashResponse = T.RemoteChainSpecGenesisHashResponse;\nexport import RemoteChainSpecPropertiesRequest = T.RemoteChainSpecPropertiesRequest;\nexport import RemoteChainSpecPropertiesResponse = T.RemoteChainSpecPropertiesResponse;\nexport import RemoteChainTransactionBroadcastRequest = T.RemoteChainTransactionBroadcastRequest;\nexport import RemoteChainTransactionBroadcastResponse = T.RemoteChainTransactionBroadcastResponse;\nexport import RemoteChainTransactionStopRequest = T.RemoteChainTransactionStopRequest;\nexport import RemotePermissionRequest = T.RemotePermissionRequest;\nexport import RemotePermissionResponse = T.RemotePermissionResponse;\nexport import RemotePreimageLookupSubscribeItem = T.RemotePreimageLookupSubscribeItem;\nexport import RemotePreimageLookupSubscribeRequest = T.RemotePreimageLookupSubscribeRequest;\nexport import RemoteStatementStoreCreateProofError = T.RemoteStatementStoreCreateProofError;\nexport import RemoteStatementStoreCreateProofRequest = T.RemoteStatementStoreCreateProofRequest;\nexport import RemoteStatementStoreCreateProofResponse = T.RemoteStatementStoreCreateProofResponse;\nexport import RemoteStatementStoreSubscribeItem = T.RemoteStatementStoreSubscribeItem;\nexport import RemoteStatementStoreSubscribeRequest = T.RemoteStatementStoreSubscribeRequest;\nexport import HostLocalStorageReadError = T.HostLocalStorageReadError;\nexport import HostLocalStorageReadRequest = T.HostLocalStorageReadRequest;\nexport import HostLocaleLocalizeTimestampsRequest = T.HostLocaleLocalizeTimestampsRequest;\nexport import HostLocaleLocalizeTimestampsResponse = T.HostLocaleLocalizeTimestampsResponse;\nexport import HostLocaleSubscribeItem = T.HostLocaleSubscribeItem;\nexport import VerticalAlignment = T.VerticalAlignment;\nexport import VrfSignature = T.VrfSignature;\nexport import VrfTranscriptItem = T.VrfTranscriptItem;\n\n// index.d.ts\n\n\n// transport.d.ts\n/**\n * Wire trait discriminant reserved for method-independent protocol errors. No\n * API trait may declare it, so no method is ever addressed here.\n **/\nexport declare const PROTOCOL_ERROR_TRAIT_ID: 255;\n/** Wire method discriminant reserved for method-independent protocol errors. **/\nexport declare const PROTOCOL_ERROR_METHOD_ID: 255;\n/** The peer rejected an outbound frame because it does not support its API. **/\nexport declare class UnsupportedMessageError extends Error {\n /** Trait discriminant of the unsupported outbound frame. **/\n readonly traitId: number;\n /** Method discriminant of the unsupported outbound frame. **/\n readonly methodId: number;\n constructor(traitId: number, methodId: number);\n}\n/** The host connection ended; interrupted operations are not retried. */\nexport declare class ConnectionResetError extends Error {\n constructor(options?: ErrorOptions);\n}\n/** Call result returned when the peer does not recognize a request frame. **/\nexport type UnsupportedCallError = Extract, {\n tag: \"Unsupported\";\n}>;\n/**\n * Handle returned by TrUAPI subscription APIs.\n **/\nexport interface Subscription {\n /**\n * Stop the subscription. Calling this more than once has no additional effect.\n **/\n unsubscribe: () => void;\n /**\n * Transport-assigned request id for the subscription start frame.\n *\n * Methods that accept a `followSubscriptionId` use this value to scope\n * follow-up requests to a specific active subscription.\n **/\n subscriptionId: string;\n}\n/**\n * Terminal error delivered through `Observer.error` for every non-normal\n * subscription end. When the peer interrupted the stream with a typed payload,\n * `reason` carries the decoded `Reason`; otherwise `reason` is `undefined` and\n * the underlying transport/decode error is preserved on `cause`.\n *\n * Discriminate with `error.reason !== undefined` (or `'reason' in error`).\n **/\nexport declare class SubscriptionError extends Error {\n /**\n * Typed payload supplied by the peer when it interrupted the subscription.\n * `undefined` when the stream ended for any other reason (transport close,\n * decode failure, malformed interrupt payload).\n **/\n readonly reason?: Reason;\n constructor(message: string, options?: {\n reason?: Reason;\n cause?: unknown;\n });\n}\n/**\n * Minimal Observable-compatible observer shape used by generated subscription\n * APIs without depending on RxJS.\n *\n * `Reason` is the typed interrupt payload for the originating subscription.\n * Methods without a typed interrupt resolve `Reason` to `never`, leaving\n * `error.reason` typed as `undefined`.\n **/\nexport interface Observer {\n /**\n * Called with each successfully decoded subscription item.\n **/\n next(value: Item): void;\n /**\n * Called once when the stream terminates with an error. Inspect\n * `error.reason` to distinguish a typed peer interrupt from a transport or\n * decode failure (`error.cause` carries the underlying failure in the\n * latter case).\n **/\n error(error: SubscriptionError): void;\n /**\n * Called once when the peer normally completes the stream.\n **/\n complete(): void;\n}\ndeclare global {\n interface SymbolConstructor {\n readonly observable: unique symbol;\n }\n}\n/**\n * Minimal Observable-compatible object returned by generated subscription APIs.\n *\n * Implements the ES Observable interop protocol so that consumers can pass\n * an instance straight to `rxjs.from(...)`.\n **/\nexport interface ObservableLike {\n /**\n * Start the stream and receive `next`, `error`, and `complete` callbacks.\n **/\n subscribe(observer?: Partial>): Subscription;\n /**\n * Observable interop hook. Returns `this`.\n **/\n [Symbol.observable](): ObservableLike;\n}\n/**\n * Product-side handler for a subscription the native host initiates.\n *\n * It receives the decoded request and two callbacks: `send` delivers one item\n * to the host, and `interrupt` ends the stream, cleanly when called with no\n * argument and with the method's interrupt value otherwise. The returned\n * teardown, if any, runs once the stream ends: on the host's stop frame, on\n * `interrupt`, when the transport closes, or when the host restarts the same\n * request id.\n **/\nexport type HostInitiatedSubscriptionHandler = (request: Request, send: (item: Item) => void, interrupt: (reason?: Reason) => void) => (() => void) | void;\n/**\n * Wire discriminant pair addressing a method. One id addresses a method\n * regardless of shape (request/response, or a subscription's four phases):\n * which leg of the exchange a frame carries is the wire's own `messageType`\n * byte, not a separate id per leg.\n **/\nexport interface MethodIds {\n /**\n * Wire trait discriminant.\n **/\n trait: number;\n /**\n * Wire method discriminant within the trait.\n **/\n method: number;\n /**\n * Whether this method's legs follow the request/response shape or the\n * subscription shape (`\"subscription\"` covers both plain and result\n * subscriptions, which share the same four-leg wire shape). The one piece\n * of shape a payload-blind reader needs to interpret a frame's own\n * `messageType` byte without decoding the payload.\n **/\n kind: \"request\" | \"subscription\";\n}\n/**\n * Per-call options every generated request method accepts as its last\n * argument.\n **/\nexport interface CallOptions {\n /** See {@link RequestParams.signal}. **/\n signal?: AbortSignal;\n}\n/**\n * Options accepted by `TrUApiTransport.request`.\n **/\nexport interface RequestParams {\n /**\n * Wire discriminants for this request method.\n **/\n ids: MethodIds;\n /**\n * SCALE-encoded request wrapper payload bytes (its own `V` tag is the\n * wire's only version signal), constructed by the generated caller.\n **/\n payload: Uint8Array;\n /**\n * Decode a `Response`-leg frame's raw payload bytes into the typed Ok/Err\n * outcome. Implementations decode `Result<{Method}Response,\n * CallError<{Method}Error>>` directly. The transport unwraps the result\n * into `ResultAsync`.\n **/\n decodeResponse: (payload: Uint8Array) => ResultPayload;\n /**\n * Withdraw the call. Aborting sends a `Cancel` frame on this method's own\n * address; the promise still settles on the response the host sends, which\n * for a call the host stopped is `CallError::Cancelled`. A signal already\n * aborted when the call is made sends nothing and rejects immediately.\n *\n * A host that predates the `Cancel` leg drops the frame, so an aborted call\n * against one settles on its deadline instead. There is no way to detect that\n * first: `system.featureSupported` answers only about chains, so an abort\n * against an older host is indistinguishable from one it honoured.\n **/\n signal?: AbortSignal;\n}\n/**\n * Options accepted by `TrUApiTransport.subscribeRaw`.\n **/\nexport interface SubscribeRawParams {\n /**\n * Wire discriminants for this subscription method.\n **/\n ids: MethodIds;\n /**\n * SCALE-encoded `Start`-leg payload bytes: the request wrapper's own\n * encoding, or empty bytes for a method with no request at all,\n * constructed by the generated caller.\n **/\n payload: Uint8Array;\n /**\n * Called with a `Receive`-leg frame's raw payload bytes.\n **/\n onReceive: (payload: Uint8Array) => void;\n /**\n * Called with an `Interrupt`-leg frame's raw payload bytes.\n **/\n onInterrupt?: (payload: Uint8Array) => void;\n /**\n * Called when a transport-level error or unsupported start frame terminates\n * the subscription.\n **/\n onClose?: (error: Error) => void;\n}\n/** Product-side registration for one host-initiated subscription method. **/\nexport interface HostInitiatedSubscriptionRegistration {\n /** Install or replace the handler used for future start frames. **/\n setHandler(handler: HostInitiatedSubscriptionHandler): {\n unsubscribe(): void;\n };\n}\n/** Options used to register a host-initiated subscription method. **/\nexport interface RegisterHostInitiatedSubscriptionParams {\n /** Wire discriminants for the host-initiated subscription. **/\n ids: MethodIds;\n /**\n * Decode a `Start`-leg frame's raw payload bytes into the typed request.\n **/\n decodeRequest(payload: Uint8Array): Request;\n /**\n * Encode one product emission as a `Receive`-leg frame's raw payload bytes.\n **/\n encodeItem(item: Item): Uint8Array;\n /**\n * Encode an `Interrupt`-leg frame's raw payload bytes: the stream's clean\n * end when `reason` is omitted, and the method's interrupt value otherwise.\n **/\n encodeInterrupt(reason?: Reason): Uint8Array;\n /**\n * Exact payload used when the transport ends a stream the product's handler\n * never got to serve.\n **/\n declinePayload: Uint8Array;\n /** Number of starts retained before a handler is installed. **/\n bufferCapacity: number;\n}\n/**\n * Byte-level transport used by generated client stubs.\n **/\nexport interface TrUApiTransport {\n /**\n * Send a one-shot request and resolve with the typed Ok/Err outcome.\n **/\n request(params: RequestParams): ResultAsync;\n /**\n * Start a subscription and return a handle that can stop it.\n **/\n subscribeRaw(params: SubscribeRawParams): Subscription;\n /** Register product-side handling for a host-initiated subscription. **/\n registerHostInitiatedSubscription(params: RegisterHostInitiatedSubscriptionParams): HostInitiatedSubscriptionRegistration;\n /**\n * Tear down the transport and release the listeners it registered on the\n * underlying `WireProvider`. Pending requests reject and live subscriptions\n * receive `onClose`. Idempotent.\n *\n * The provider itself is left alone; the caller decides whether to also\n * call `provider.dispose()` (long-lived hosts that swap providers will\n * typically dispose the transport but keep the provider).\n **/\n dispose(): void;\n}\n/**\n * Tagged payload inside a TrUAPI wire frame.\n **/\nexport interface Payload {\n /**\n * Wire-table trait discriminant: first byte of the `(trait, method)` pair.\n **/\n traitId: number;\n /**\n * Wire-table method discriminant within the trait: second byte of the pair.\n **/\n methodId: number;\n /**\n * Which leg of the method's exchange this frame carries: `Request`/`Start`\n * = 0, `Response`/`Receive` = 1, `Interrupt` = 2, `Stop` = 3. Third byte of\n * the wire frame \u2014 readable generically, without decoding `value`.\n **/\n messageType: number;\n /**\n * SCALE-encoded payload body: that leg's own versioned wrapper, with no\n * further tag identifying direction or version beyond the wrapper's own.\n **/\n value: Uint8Array;\n}\n/** See {@link Payload.messageType}. */\nexport declare const MESSAGE_TYPE_REQUEST = 0;\n/** See {@link Payload.messageType}. */\nexport declare const MESSAGE_TYPE_START = 0;\n/** See {@link Payload.messageType}. */\nexport declare const MESSAGE_TYPE_RESPONSE = 1;\n/** See {@link Payload.messageType}. */\nexport declare const MESSAGE_TYPE_RECEIVE = 1;\n/** See {@link Payload.messageType}. */\nexport declare const MESSAGE_TYPE_INTERRUPT = 2;\n/** See {@link Payload.messageType}. */\nexport declare const MESSAGE_TYPE_STOP = 3;\n/**\n * A request's withdrawal, correlated by the same `requestId` and carrying no\n * payload. The call still settles with exactly one response; this only fires\n * the handler's cancellation token on the far side.\n **/\nexport declare const MESSAGE_TYPE_CANCEL = 4;\n/**\n * Top-level TrUAPI wire message.\n **/\nexport interface ProtocolMessage {\n /**\n * Request id used to correlate request/response and subscription frames.\n **/\n requestId: string;\n /**\n * Tagged SCALE payload carried by this frame.\n **/\n payload: Payload;\n}\n/**\n * Raw SCALE-wire-frame pipe abstraction used by the transport. A `WireProvider`\n * is the low-level channel (a `MessagePort` or iframe `postMessage` link) that\n * carries encoded frames between the product and the host.\n **/\nexport interface WireProvider {\n /**\n * Send a complete SCALE-encoded wire frame to the peer.\n **/\n postMessage(message: Uint8Array): void;\n /**\n * Register a callback for inbound SCALE-encoded wire frames.\n **/\n subscribe(callback: (message: Uint8Array) => void): () => void;\n /**\n * Register a callback for provider-level close or failure events.\n *\n * Providers keep a terminal close reason. The callback fires at most once\n * for an active subscription, and fires immediately when registered after\n * the provider has already closed.\n **/\n subscribeClose?(callback: (error: Error) => void): () => void;\n /** End current operations while keeping the provider available for new work. */\n subscribeReset?(callback: (error: Error) => void): () => void;\n /**\n * Release provider resources and close the underlying pipe.\n **/\n dispose(): void;\n}\n/**\n * A {@link WireProvider} backed by a WebSocket, which reports when its socket\n * is up. Awaiting {@link WebSocketWireProvider.opened} is optional: frames\n * posted earlier are queued and flushed on open.\n **/\nexport interface WebSocketWireProvider extends WireProvider {\n /** Resolves once the socket is open, rejects if it never connects. */\n opened: Promise;\n}\n/**\n * Encode a `ProtocolMessage` into a SCALE wire frame.\n **/\nexport declare function encodeWireMessage(message: ProtocolMessage): Result;\n/**\n * Decode a SCALE wire frame into a `ProtocolMessage`.\n **/\nexport declare function decodeWireMessage(message: Uint8Array): Result;\n/**\n * Create a provider for the child side of an iframe `postMessage` channel.\n *\n * `target` is the `Window` the provider posts to (typically `window.parent`);\n * `hostOrigin` is the pinned `targetOrigin` for outbound frames and the\n * required `event.origin` of inbound frames. The provider only delivers\n * frames whose `event.source === target` and `event.origin === hostOrigin`,\n * so it cannot be coerced by an unrelated frame parent.\n **/\nexport declare function createIframeProvider(options: {\n target: Window;\n hostOrigin: string;\n}): WireProvider;\n/**\n * Create a provider from a web or Electron `MessagePort`.\n **/\nexport declare function createMessagePortProvider(port: MessagePort | Promise): WireProvider;\n/**\n * Wire provider over a binary WebSocket, one message per SCALE frame.\n *\n * This is the transport a host exposes on a loopback socket: the Rust core's\n * `ws-bridge`, and `truapi-host signing-host --frame-listen`. The frame bytes\n * are identical to what the {@link createMessagePortProvider} path carries, so\n * this is a pipe and nothing more.\n *\n * Frames posted before the socket opens are queued and flushed on open, so a\n * caller never has to await {@link WebSocketWireProvider.opened} first.\n **/\nexport declare function createWebSocketProvider(url: string): WebSocketWireProvider;\n/** Capture native socket APIs before product code installs network gates. */\nexport declare function createWebSocketProviderFactory(): (url: string) => WebSocketWireProvider;\n\n\n// client.d.ts\nexport type { Subscription, TrUApiTransport };\n/** A request received no matching response before its transport deadline. */\nexport declare class RequestTimeoutError extends Error {\n /** Transport-assigned request identifier. */\n readonly requestId: string;\n /** Trait discriminant of the unanswered request. */\n readonly traitId: number;\n /** Method discriminant of the unanswered request. */\n readonly methodId: number;\n /** Deadline that elapsed, in milliseconds. */\n readonly timeoutMs: number;\n constructor(requestId: string, traitId: number, methodId: number, timeoutMs: number);\n}\n/**\n * Options accepted when constructing a transport.\n */\nexport interface CreateTransportOptions {\n /** Request ID namespace when multiple transports share a connection. Defaults to `p:`. */\n requestIdPrefix?: string;\n /** Wait for connection readiness before sending a request or starting a subscription. */\n prepare?: (ids: MethodIds) => Promise;\n /** Replace a failed connection after a malformed frame; otherwise the transport closes permanently. */\n onProtocolError?: (error: Error) => void;\n /**\n * Maximum time to wait for a matching response before rejecting the request.\n *\n * Defaults to 120 seconds. This bounds dead hosts and missed transport\n * handshakes while leaving interactive approval flows enough time to finish.\n * The handshake keeps its own shorter deadline, since a codec mismatch means\n * no answer is ever coming.\n */\n requestTimeoutMs?: number;\n}\n/**\n * Build a `TrUApiTransport` on top of a `WireProvider`, adding request/response\n * correlation and subscription start/receive/stop lifecycle handling.\n */\nexport declare function createTransport(provider: WireProvider, options?: CreateTransportOptions): TrUApiTransport;\n\n\n// generated/index.d.ts\n\n\n// generated/client.d.ts\nexport { ResultAsync, SubscriptionError };\nexport type { CallOptions, HostInitiatedSubscriptionHandler, ObservableLike, Observer, Result, Subscription, TrUApiTransport };\nexport declare const TRUAPI_VERSION: 2;\nexport declare const TRUAPI_CODEC_VERSION: 3;\nexport declare const TRUAPI_WIRE_SCHEMA_HASH: \"7c073d1a8c5db314\";\n/** Account lookup, aliasing, and proof generation. */\nexport declare class AccountClient {\n #private;\n constructor(transport: TrUApiTransport);\n /** Subscribe to account connection status changes. */\n connectionStatusSubscribe(): ObservableLike>;\n /** Retrieve a product-scoped account. */\n getAccount(request: T.HostAccountGetRequest, options?: CallOptions): ResultAsync>;\n /** Retrieve the contextual alias for a context and ring. */\n getAccountAlias(request: T.HostAccountGetAliasRequest, options?: CallOptions): ResultAsync>;\n /** Generate a ring VRF proof with an explicitly registered member key. */\n createAccountProof(request: T.HostAccountCreateProofRequest, options?: CallOptions): ResultAsync>;\n /**\n * Produce an sr25519 (schnorrkel) VRF signature from a product account.\n *\n * The host builds a Merlin transcript from `transcriptLabel` and `items`\n * and signs it with the account's key, returning the VRF pre-output and\n * proof. Authorized like signing: local when `AutoSigning` covers the\n * account, otherwise a per-call user confirmation.\n */\n signVrf(request: T.HostAccountSignVrfRequest, options?: CallOptions): ResultAsync>;\n /** Register a ring-VRF key owned by the calling product. */\n registerRingVrfKey(request: T.HostAccountRegisterRingVrfKeyRequest, options?: CallOptions): ResultAsync>;\n /** List registered ring-VRF keys owned by a product. */\n listRingVrfKeys(request: T.HostAccountListRingVrfKeysRequest, options?: CallOptions): ResultAsync, S.CallErrorValue>;\n /** Sign bytes directly with a registered ring-VRF member key. */\n ringVrfSign(request: T.HostAccountRingVrfSignRequest, options?: CallOptions): ResultAsync>;\n /**\n * List non-product accounts the user owns.\n *\n * Current hosts do not expose non-product accounts, so the list is empty.\n */\n getLegacyAccounts(options?: CallOptions): ResultAsync>;\n /** Fetch the user's primary identity. */\n getUserId(options?: CallOptions): ResultAsync>;\n /**\n * Request the host to present the login flow to the user.\n *\n * Products should call this in response to a user action (e.g. tapping a\n * \"Sign in\" button), not automatically on load.\n */\n requestLogin(request: T.HostRequestLoginRequest, options?: CallOptions): ResultAsync>;\n}\n/** Chain interaction methods. */\nexport declare class ChainClient {\n #private;\n constructor(transport: TrUApiTransport);\n /** Follow the chain head and receive block events. */\n followHeadSubscribe({ request }: {\n request: T.RemoteChainHeadFollowRequest;\n }): ObservableLike>;\n /** Fetch a block header. */\n getHeadHeader(request: T.RemoteChainHeadHeaderRequest, options?: CallOptions): ResultAsync>;\n /** Fetch a block body. */\n getHeadBody(request: T.RemoteChainHeadBodyRequest, options?: CallOptions): ResultAsync>;\n /** Query runtime storage at a specific block. */\n getHeadStorage(request: T.RemoteChainHeadStorageRequest, options?: CallOptions): ResultAsync>;\n /** Invoke a runtime call at a specific block. */\n callHead(request: T.RemoteChainHeadCallRequest, options?: CallOptions): ResultAsync>;\n /** Release pinned blocks. */\n unpinHead(request: T.RemoteChainHeadUnpinRequest, options?: CallOptions): ResultAsync>;\n /** Continue a paused chain-head operation. */\n continueHead(request: T.RemoteChainHeadContinueRequest, options?: CallOptions): ResultAsync>;\n /** Stop a chain-head operation. */\n stopHeadOperation(request: T.RemoteChainHeadStopOperationRequest, options?: CallOptions): ResultAsync>;\n /** Fetch the canonical genesis hash for a chain. */\n getSpecGenesisHash(request: T.RemoteChainSpecGenesisHashRequest, options?: CallOptions): ResultAsync>;\n /** Fetch the display name of a chain. */\n getSpecChainName(request: T.RemoteChainSpecChainNameRequest, options?: CallOptions): ResultAsync>;\n /** Fetch the JSON-encoded properties of a chain. */\n getSpecProperties(request: T.RemoteChainSpecPropertiesRequest, options?: CallOptions): ResultAsync>;\n /** Broadcast a signed transaction. */\n broadcastTransaction(request: T.RemoteChainTransactionBroadcastRequest, options?: CallOptions): ResultAsync>;\n /** Stop a transaction broadcast. */\n stopTransaction(request: T.RemoteChainTransactionStopRequest, options?: CallOptions): ResultAsync>;\n /**\n * Resolve a chain identifier to its genesis hash against the host's\n * configured environment (RFC 0026).\n */\n getChainInfo(request: T.RemoteChainInfoRequest, options?: CallOptions): ResultAsync>;\n}\n/** Chat room, bot, and message APIs. */\nexport declare class ChatClient {\n #private;\n constructor(transport: TrUApiTransport);\n /** Create a chat room. */\n createRoom(request: T.HostChatCreateRoomRequest, options?: CallOptions): ResultAsync>;\n /** Register a chat bot. */\n registerBot(request: T.HostChatRegisterBotRequest, options?: CallOptions): ResultAsync>;\n /** Subscribe to the list of chat rooms. */\n listSubscribe(): ObservableLike>;\n /**\n * Post a message to a chat room.\n *\n * The host bounds and screens what it forwards. Message text is capped at\n * 16 KiB and keeps line breaks and tabs, but is rejected for other\n * control characters and for bidirectional overrides. Identifiers and\n * display names are normalized and screened. A message carries at most 32\n * actions and 32 media items, a custom payload at most 256 KiB, and a URL\n * at most 2 KiB which must be `https` or an inline raster image. A\n * rejection reports `MessageTooLarge` when the body or custom payload is\n * over budget, and `Unknown` with a reason naming the field otherwise.\n *\n * The returned `messageId` is the correlation key for any action the\n * message carries: a later `actionSubscribe` trigger names it.\n */\n postMessage(request: T.HostChatPostMessageRequest, options?: CallOptions): ResultAsync>;\n /** Subscribe to received chat actions. */\n actionSubscribe(): ObservableLike>;\n}\n/**\n * CoinPayment operations.\n *\n * RFC 0017 describes `Resolvable` values for long-running operations.\n * TrUAPI represents those as subscriptions whose items are the RFC status\n * updates.\n */\nexport declare class CoinPaymentClient {\n #private;\n constructor(transport: TrUApiTransport);\n /** Create a new firewalled CoinPayment purse. */\n createPurse(request: T.HostCoinPaymentCreatePurseRequest, options?: CallOptions): ResultAsync>;\n /** Query product-visible purse metadata and balance. */\n queryPurse(request: T.HostCoinPaymentQueryPurseRequest, options?: CallOptions): ResultAsync>;\n /** Transfer balance between local purses. */\n rebalancePurse({ request }: {\n request: T.HostCoinPaymentRebalancePurseRequest;\n }): ObservableLike>;\n /** Delete a purse after draining its balance into another local purse. */\n deletePurse({ request }: {\n request: T.HostCoinPaymentDeletePurseRequest;\n }): ObservableLike>;\n /** Create a receivable public key for depositing into a purse. */\n createReceivable(request: T.HostCoinPaymentCreateReceivableRequest, options?: CallOptions): ResultAsync>;\n /** Create a cheque paying from a local purse to a receivable. */\n createCheque(request: T.HostCoinPaymentCreateChequeRequest, options?: CallOptions): ResultAsync>;\n /** Claim coins from a cheque into the receivable's purse. */\n deposit({ request }: {\n request: T.HostCoinPaymentDepositRequest;\n }): ObservableLike>;\n /** Attempt to return coins associated with a receivable. */\n refund({ request }: {\n request: T.HostCoinPaymentRefundRequest;\n }): ObservableLike>;\n /** Listen for a cheque delivered through a standard transmission channel. */\n listenForPayment({ request }: {\n request: T.HostCoinPaymentListenForRequest;\n }): ObservableLike>;\n}\n/**\n * User-mediated access to the user's contacts.\n *\n * A product never reads the contact list. It opens the host's picker; the host\n * renders an overlay from the chat lists its chat extensions hold, and\n * returns only the person the user selected. Names, accounts, and every other\n * contact the user did not pick stay host-side.\n *\n * That is also why there is no permission to request: the user choosing a\n * contact in host UI is the consent, and a product that is never handed the\n * list has nothing to be granted.\n */\nexport declare class ContactsClient {\n #private;\n constructor(transport: TrUApiTransport);\n /**\n * Ask the host to let the user pick one contact.\n *\n * Resolves with the chosen contact's handle, or with why nothing was\n * chosen. A host that serves no picker answers `Unsupported`.\n *\n * The handle is not an address and cannot be turned into one. To pay the\n * person it names, put the handle where the recipient goes in the call and\n * list it in `contacts` on the transaction payload: the host replaces it\n * with their account before anything is signed or shown. A handle sent\n * anywhere else is 32 bytes that resolve to nobody.\n */\n pick(request: T.HostContactsPickRequest, options?: CallOptions): ResultAsync>;\n}\n/** Deterministic entropy derivation. */\nexport declare class EntropyClient {\n #private;\n constructor(transport: TrUApiTransport);\n /** Derive deterministic entropy. */\n derive(request: T.HostDeriveEntropyRequest, options?: CallOptions): ResultAsync>;\n}\n/** Local key/value storage scoped to the calling product. */\nexport declare class LocalStorageClient {\n #private;\n constructor(transport: TrUApiTransport);\n /** Read a value by key. */\n read(request: T.HostLocalStorageReadRequest, options?: CallOptions): ResultAsync>;\n /** Write a value to a key. */\n write(request: T.HostLocalStorageWriteRequest, options?: CallOptions): ResultAsync>;\n /** Clear a value by key. */\n clear(request: T.HostLocalStorageClearRequest, options?: CallOptions): ResultAsync>;\n /**\n * Subscribe to changes of one key in the product's own storage namespace.\n *\n * Emits the current value immediately, then one item per later write or\n * clear of the key by any of the product's runtimes. A write that leaves\n * the stored bytes unchanged emits nothing.\n */\n subscribe({ request }: {\n request: T.HostLocalStorageSubscribeRequest;\n }): ObservableLike>;\n}\n/** Host locale subscription. */\nexport declare class LocaleClient {\n #private;\n constructor(transport: TrUApiTransport);\n /** Subscribe to the host's selected locale. */\n subscribe(): ObservableLike>;\n /** Localize a bounded batch of UTC instants in a host locale snapshot. */\n localizeTimestamps(request: T.HostLocaleLocalizeTimestampsRequest, options?: CallOptions): ResultAsync>;\n}\n/** Notification methods for locally-rendered push notifications. */\nexport declare class NotificationsClient {\n #private;\n constructor(transport: TrUApiTransport);\n /**\n * Send a push notification to the user.\n *\n * Returns a notification id that can be\n * passed to [`cancel_push_notification`](Self::cancel_push_notification)\n * to retract a scheduled notification. When `scheduled_at` is set the host\n * persists the notification across restarts and fires it through the\n * platform-native scheduler. See [RFC 0019].\n *\n * [RFC 0019]: https://github.com/paritytech/trinity-user-agents/blob/main/docs/rfcs/0019-scheduled-notifications.md\n */\n sendPushNotification(request: T.HostPushNotificationRequest, options?: CallOptions): ResultAsync>;\n /**\n * Cancels a previously issued push notification.\n *\n * Cancellation is idempotent: returns `Ok(())` whether the notification is\n * still pending, already fired, or was never issued. See [RFC 0019].\n *\n * [RFC 0019]: https://github.com/paritytech/trinity-user-agents/blob/main/docs/rfcs/0019-scheduled-notifications.md\n */\n cancelPushNotification(request: T.HostPushNotificationCancelRequest, options?: CallOptions): ResultAsync>;\n}\n/** Payment request and balance/status subscription methods. */\nexport declare class PaymentClient {\n #private;\n constructor(transport: TrUApiTransport);\n /** Subscribe to payment balance updates. */\n balanceSubscribe({ request }: {\n request: T.HostPaymentBalanceSubscribeRequest;\n }): ObservableLike>;\n /** Request a payment from the user. */\n request(request: T.HostPaymentRequest, options?: CallOptions): ResultAsync>;\n /** Subscribe to payment lifecycle updates for a specific payment. */\n statusSubscribe({ request }: {\n request: T.HostPaymentStatusSubscribeRequest;\n }): ObservableLike>;\n /** Top up the user's payment balance. */\n topUp(request: T.HostPaymentTopUpRequest, options?: CallOptions): ResultAsync>;\n}\n/** Permission request methods. */\nexport declare class PermissionsClient {\n #private;\n constructor(transport: TrUApiTransport);\n /** Request a device-capability permission from the user. */\n requestDevicePermission(request: T.HostDevicePermissionRequest, options?: CallOptions): ResultAsync>;\n /**\n * Request a remote-operation permission.\n *\n * This example makes live requests to Frankfurter after permission is granted.\n */\n requestRemotePermission(request: T.RemotePermissionRequest, options?: CallOptions): ResultAsync>;\n}\n/**\n * Pocket cards backed by the calling product.\n *\n * The host owns the collection: a product observes its own cards and may\n * remove them, but cannot add one.\n */\nexport declare class PocketClient {\n #private;\n constructor(transport: TrUApiTransport);\n /**\n * Subscribe to the calling product's cards.\n *\n * Emits the whole set on subscribe and again after every change.\n */\n listSubscribe(): ObservableLike>;\n /**\n * Remove one of the calling product's cards.\n *\n * Removing a card that is not present succeeds. A privileged card is\n * refused with `Privileged`.\n */\n removeCard(request: T.HostPocketRemoveCardRequest, options?: CallOptions): ResultAsync>;\n}\n/** Preimage lookup and submission methods. */\nexport declare class PreimageClient {\n #private;\n constructor(transport: TrUApiTransport);\n /** Subscribe to preimage lookups for a given key. */\n lookupSubscribe({ request }: {\n request: T.RemotePreimageLookupSubscribeRequest;\n }): ObservableLike>;\n /** Submit a preimage. Returns the preimage key (hash) on success. */\n submit(request: HexString, options?: CallOptions): ResultAsync>;\n}\n/** Product-rendered bodies and the actions triggered inside them. */\nexport declare class RendererClient {\n #private;\n constructor(transport: TrUApiTransport);\n /**\n * Streams renderer trees for one product-rendered body. Each item\n * replaces the previous tree. The stream stays open while the body is\n * displayed so the product can redraw in place.\n */\n onRender(handler: HostInitiatedSubscriptionHandler>): {\n unsubscribe(): void;\n };\n /** Subscribe to actions triggered inside this product's rendered bodies. */\n actionSubscribe(): ObservableLike>;\n}\n/** Resource pre-allocation (allowance management). */\nexport declare class ResourceAllocationClient {\n #private;\n constructor(transport: TrUApiTransport);\n /** Request the host to pre-allocate one or more resources. */\n request(request: T.HostRequestResourceAllocationRequest, options?: CallOptions): ResultAsync>;\n}\n/** Signing operations. */\nexport declare class SigningClient {\n #private;\n constructor(transport: TrUApiTransport);\n /**\n * Construct a transaction for a product account.\n *\n * Served locally without a user confirmation when an RFC-0010 `AutoSigning`\n * grant covers the account; otherwise each call is confirmed by the user.\n *\n * Under Extrinsic V5, omitting `VerifyMultiSignature` from `extensions`\n * lets the host sign with the signer's key. Listing it \u2014 as `Disabled`,\n * with a proof in a later extension \u2014 encodes the given bytes verbatim and\n * returns an unsigned transaction.\n *\n * `txExtVersion` is the version of the transaction extensions in\n * `extensions`, as the runtime numbers them. The host picks the extrinsic\n * format from it. V4 always uses version 0, so a non-zero version builds a\n * V5 general transaction. Version 0 builds V5 when it includes\n * `VerifyMultiSignature`, and a signed V4 transaction otherwise.\n *\n * `contacts` lists the contact handles `callData` names, and the host\n * replaces each with the account it resolves to before the call is shown\n * or signed. A declared handle the call does not contain, or one no\n * contact matches, refuses the whole call as `UnknownContact` rather than\n * signing something that names somebody else. A call paying nobody from\n * the picker leaves it empty.\n */\n createTransaction(request: T.ProductAccountTxPayload, options?: CallOptions): ResultAsync>;\n /**\n * Construct a transaction for a non-product (legacy) account.\n *\n * The V5 `VerifyMultiSignature` rule is the same as\n * [`Signing::create_transaction`]: omit it and the host signs, list it and\n * the given bytes are used with no host signature.\n */\n createTransactionWithLegacyAccount(request: T.LegacyAccountTxPayload, options?: CallOptions): ResultAsync>;\n /** Sign raw bytes with a non-product account. */\n signRawWithLegacyAccount(request: T.HostSignRawWithLegacyAccountRequest, options?: CallOptions): ResultAsync>;\n /** Sign an extrinsic payload with a non-product account. */\n signPayloadWithLegacyAccount(request: T.HostSignPayloadWithLegacyAccountRequest, options?: CallOptions): ResultAsync>;\n /**\n * Sign raw bytes or a message.\n *\n * Served locally without a user confirmation when an RFC-0010 `AutoSigning`\n * grant covers the account; otherwise each call is confirmed by the user.\n */\n signRaw(request: T.HostSignRawRequest, options?: CallOptions): ResultAsync>;\n /**\n * Sign an extrinsic payload.\n *\n * Served locally without a user confirmation when an RFC-0010 `AutoSigning`\n * grant covers the account; otherwise each call is confirmed by the user.\n */\n signPayload(request: T.HostSignPayloadRequest, options?: CallOptions): ResultAsync>;\n /**\n * Sign the supplied data without adding or removing a watermark.\n *\n * Temporary compatibility API for runtime ownership proofs, including the\n * 32-byte Resources alias used by Humanity. Payload decoding matches\n * watermarked signing, but the decoded bytes are signed exactly as supplied.\n * This permits transaction-shaped data and requires signing authorization\n * and explicit user confirmation.\n *\n * @deprecated Temporary unwatermarked signing; migrate to watermarked signing when the runtime supports it. This API will be removed. See \n */\n signRawUnwatermarkedDeprecated(request: T.HostSignRawRequest, options?: CallOptions): ResultAsync>;\n /**\n * Sign the supplied data without adding or removing a watermark.\n *\n * Temporary compatibility API for runtime ownership proofs, including the\n * 32-byte Resources alias used by Humanity. Payload decoding matches\n * watermarked signing, but the decoded bytes are signed exactly as supplied.\n * This permits transaction-shaped data and requires signing authorization\n * and explicit user confirmation.\n *\n * @deprecated Temporary unwatermarked signing; migrate to watermarked signing when the runtime supports it. This API will be removed. See \n */\n signRawUnwatermarkedDeprecatedWithLegacyAccount(request: T.HostSignRawWithLegacyAccountRequest, options?: CallOptions): ResultAsync>;\n}\n/** Statement store methods. */\nexport declare class StatementStoreClient {\n #private;\n constructor(transport: TrUApiTransport);\n /** Subscribe to statements matching a topic filter. */\n subscribe({ request }: {\n request: T.RemoteStatementStoreSubscribeRequest;\n }): ObservableLike>;\n /**\n * Create a proof for a statement.\n *\n * **Deprecated:** use [`create_proof_authorized`](Self::create_proof_authorized)\n * instead, which uses a pre-allocated allowance account and does not\n * require a per-call signing prompt. Pairing hosts may reject this method\n * when their signing channel cannot sign statement proof payloads exactly.\n */\n createProof(request: T.RemoteStatementStoreCreateProofRequest, options?: CallOptions): ResultAsync>;\n /**\n * Create a proof for a statement using a pre-allocated allowance account,\n * bypassing the per-call signing prompt.\n */\n createProofAuthorized(request: T.Statement, options?: CallOptions): ResultAsync>;\n /**\n * Submit a signed statement to the network. The request body is the\n * [`SignedStatement`](crate::v01::SignedStatement) directly (no wrapping\n * struct), matching upstream `triangle-js-sdks`.\n */\n submit(request: T.SignedStatement, options?: CallOptions): ResultAsync>;\n}\n/**\n * General-purpose TrUAPI methods for handshake, feature detection,\n * navigation, and runtime information.\n */\nexport declare class SystemClient {\n #private;\n constructor(transport: TrUApiTransport);\n /** Negotiate the wire codec version with the product. */\n handshake(options?: CallOptions): ResultAsync>;\n /** Query whether the host supports a specific feature. */\n featureSupported(request: T.HostFeatureSupportedRequest, options?: CallOptions): ResultAsync>;\n /**\n * Request the host to open a URL.\n *\n * An `http` or `https` URL outside the ecosystem needs a\n * `RemotePermission::Remote` grant for the target host, and prompts for one\n * on first use. dotNS names, `localhost`, and the app-handoff schemes\n * (`mailto:`, `tel:`, `polkadot:`, `dot:`) consume no grant. The grant is\n * per host and shared with outbound data access to that host, so approving\n * one covers the other.\n */\n navigateTo(request: T.HostNavigateToRequest, options?: CallOptions): ResultAsync>;\n /**\n * Report the host's identity and version.\n *\n * Returns the host's platform, name, and version so a product knows\n * exactly which host \u2014 and which build of it \u2014 is running it: for\n * adapting to the host, telemetry, and attributing behaviour to a\n * concrete build in diagnostics and bug reports.\n */\n info(options?: CallOptions): ResultAsync>;\n /** Return the product context bound to the current host runtime. */\n getProductContext(options?: CallOptions): ResultAsync>;\n}\n/** Host theme subscription. */\nexport declare class ThemeClient {\n #private;\n constructor(transport: TrUApiTransport);\n /** Subscribe to host theme changes. */\n subscribe(): ObservableLike>;\n}\n/**\n * Worker background-operation APIs.\n *\n * The host keeps a product's worker running while it holds at least one open\n * operation, which is how a worker outlives the surface that started it.\n */\nexport declare class WorkerClient {\n #private;\n constructor(transport: TrUApiTransport);\n /** Begin a pending operation. */\n beginOperation(request: T.HostWorkerBeginOperationRequest, options?: CallOptions): ResultAsync>;\n /**\n * End a pending operation. Idempotent: an unknown or already-ended id\n * succeeds, so a retry after an ambiguous failure is safe.\n */\n endOperation(request: T.HostWorkerEndOperationRequest, options?: CallOptions): ResultAsync>;\n}\nexport interface TrUApiClient {\n readonly account: AccountClient;\n readonly chain: ChainClient;\n readonly chat: ChatClient;\n readonly coinPayment: CoinPaymentClient;\n readonly contacts: ContactsClient;\n readonly entropy: EntropyClient;\n readonly localStorage: LocalStorageClient;\n readonly locale: LocaleClient;\n readonly notifications: NotificationsClient;\n readonly payment: PaymentClient;\n readonly permissions: PermissionsClient;\n readonly pocket: PocketClient;\n readonly preimage: PreimageClient;\n readonly renderer: RendererClient;\n readonly resourceAllocation: ResourceAllocationClient;\n readonly signing: SigningClient;\n readonly statementStore: StatementStoreClient;\n readonly system: SystemClient;\n readonly theme: ThemeClient;\n readonly worker: WorkerClient;\n}\nexport type Client = TrUApiClient;\n/** Creates the generated client facade by binding each service namespace to the\n * shared transport instance. */\nexport declare function createClient(transport: TrUApiTransport): TrUApiClient;\n\n\n// development.d.ts\n/** Same as `HostAccountCreateProofRequest`, with the 32-byte context given raw. */\nexport interface DevelopmentCreateProofRequest extends Omit {\n /** The exact 32 bytes the proof is bound to, as `0x`-prefixed hex. */\n context: HexString;\n}\n/**\n * `account.createAccountProof` with a verbatim 32-byte proof context instead of\n * a product-namespaced one.\n *\n */\nexport declare function development_createAccountProof(client: Pick, request: DevelopmentCreateProofRequest): ResultAsync>;\n"; +export declare const truapiDts = "// neverthrow (inlined)\n\ninterface ErrorConfig {\n withStackTrace: boolean;\n}\n\ndeclare class ResultAsync implements PromiseLike> {\n private _promise;\n constructor(res: Promise>);\n static fromSafePromise(promise: PromiseLike): ResultAsync;\n static fromPromise(promise: PromiseLike, errorFn: (e: unknown) => E): ResultAsync;\n static fromThrowable(fn: (...args: A) => Promise, errorFn?: (err: unknown) => E): (...args: A) => ResultAsync;\n static combine, ...ResultAsync[]]>(asyncResultList: T): CombineResultAsyncs;\n static combine[]>(asyncResultList: T): CombineResultAsyncs;\n static combineWithAllErrors, ...ResultAsync[]]>(asyncResultList: T): CombineResultsWithAllErrorsArrayAsync;\n static combineWithAllErrors[]>(asyncResultList: T): CombineResultsWithAllErrorsArrayAsync;\n map(f: (t: T) => A | Promise): ResultAsync;\n andThrough(f: (t: T) => Result | ResultAsync): ResultAsync;\n andTee(f: (t: T) => unknown): ResultAsync;\n orTee(f: (t: E) => unknown): ResultAsync;\n mapErr(f: (e: E) => U | Promise): ResultAsync;\n andThen>(f: (t: T) => R): ResultAsync, InferErrTypes | E>;\n andThen>(f: (t: T) => R): ResultAsync, InferAsyncErrTypes | E>;\n andThen(f: (t: T) => Result | ResultAsync): ResultAsync;\n orElse>(f: (e: E) => R): ResultAsync | T, InferErrTypes>;\n orElse>(f: (e: E) => R): ResultAsync | T, InferAsyncErrTypes>;\n orElse(f: (e: E) => Result | ResultAsync): ResultAsync;\n match(ok: (t: T) => A, _err: (e: E) => B): Promise;\n unwrapOr(t: A): Promise;\n /**\n * @deprecated will be removed in 9.0.0.\n *\n * You can use `safeTry` without this method.\n * @example\n * ```typescript\n * safeTry(async function* () {\n * const okValue = yield* yourResult\n * })\n * ```\n * Emulates Rust's `?` operator in `safeTry`'s body. See also `safeTry`.\n */\n safeUnwrap(): AsyncGenerator, T>;\n then(successCallback?: (res: Result) => A | PromiseLike, failureCallback?: (reason: unknown) => B | PromiseLike): PromiseLike;\n [Symbol.asyncIterator](): AsyncGenerator, T>;\n}\ndeclare function okAsync(value: T): ResultAsync;\ndeclare function okAsync(value: void): ResultAsync;\ndeclare function errAsync(err: E): ResultAsync;\ndeclare function errAsync(err: void): ResultAsync;\ndeclare const fromPromise: typeof ResultAsync.fromPromise;\ndeclare const fromSafePromise: typeof ResultAsync.fromSafePromise;\ndeclare const fromAsyncThrowable: typeof ResultAsync.fromThrowable;\ndeclare type CombineResultAsyncs[]> = IsLiteralArray extends 1 ? TraverseAsync> : ResultAsync, ExtractErrAsyncTypes[number]>;\ndeclare type CombineResultsWithAllErrorsArrayAsync[]> = IsLiteralArray extends 1 ? TraverseWithAllErrorsAsync> : ResultAsync, ExtractErrAsyncTypes[number][]>;\ndeclare type UnwrapAsync = IsLiteralArray extends 1 ? Writable extends [infer H, ...infer Rest] ? H extends PromiseLike ? HI extends Result ? [Dedup, ...UnwrapAsync] : never : never : [] : T extends Array ? A extends PromiseLike ? HI extends Result ? Ok[] : never : never : never;\ndeclare type TraverseAsync = IsLiteralArray extends 1 ? Combine extends [infer Oks, infer Errs] ? ResultAsync, MembersToUnion> : never : T extends Array ? Combine, Depth> extends [infer Oks, infer Errs] ? Oks extends unknown[] ? Errs extends unknown[] ? ResultAsync, MembersToUnion> : ResultAsync, Errs> : Errs extends unknown[] ? ResultAsync> : ResultAsync : never : never;\ndeclare type TraverseWithAllErrorsAsync = TraverseAsync extends ResultAsync ? ResultAsync : never;\ndeclare type Writable = T extends ReadonlyArray ? [...T] : T;\n\ndeclare type ExtractOkTypes[]> = {\n [idx in keyof T]: T[idx] extends Result ? U : never;\n};\ndeclare type ExtractOkAsyncTypes[]> = {\n [idx in keyof T]: T[idx] extends ResultAsync ? U : never;\n};\ndeclare type ExtractErrTypes[]> = {\n [idx in keyof T]: T[idx] extends Result ? E : never;\n};\ndeclare type ExtractErrAsyncTypes[]> = {\n [idx in keyof T]: T[idx] extends ResultAsync ? E : never;\n};\ndeclare type InferOkTypes = R extends Result ? T : never;\ndeclare type InferErrTypes = R extends Result ? E : never;\ndeclare type InferAsyncOkTypes = R extends ResultAsync ? T : never;\ndeclare type InferAsyncErrTypes = R extends ResultAsync ? E : never;\n\ndeclare namespace Result {\n /**\n * Wraps a function with a try catch, creating a new function with the same\n * arguments but returning `Ok` if successful, `Err` if the function throws\n *\n * @param fn function to wrap with ok on success or err on failure\n * @param errorFn when an error is thrown, this will wrap the error result if provided\n */\n function fromThrowable any, E>(fn: Fn, errorFn?: (e: unknown) => E): (...args: Parameters) => Result, E>;\n function combine, ...Result[]]>(resultList: T): CombineResults;\n function combine[]>(resultList: T): CombineResults;\n function combineWithAllErrors, ...Result[]]>(resultList: T): CombineResultsWithAllErrorsArray;\n function combineWithAllErrors[]>(resultList: T): CombineResultsWithAllErrorsArray;\n}\ndeclare type Result = Ok | Err;\ndeclare function ok(value: T): Ok;\ndeclare function ok(value: void): Ok;\ndeclare function err(err: E): Err;\ndeclare function err(err: E): Err;\ndeclare function err(err: void): Err;\n/**\n * Evaluates the given generator to a Result returned or an Err yielded from it,\n * whichever comes first.\n *\n * This function is intended to emulate Rust's ? operator.\n * See `/tests/safeTry.test.ts` for examples.\n *\n * @param body - What is evaluated. In body, `yield* result` works as\n * Rust's `result?` expression.\n * @returns The first occurrence of either an yielded Err or a returned Result.\n */\ndeclare function safeTry(body: () => Generator, Result>): Result;\ndeclare function safeTry, GeneratorReturnResult extends Result>(body: () => Generator): Result, InferErrTypes | InferErrTypes>;\n/**\n * Evaluates the given generator to a Result returned or an Err yielded from it,\n * whichever comes first.\n *\n * This function is intended to emulate Rust's ? operator.\n * See `/tests/safeTry.test.ts` for examples.\n *\n * @param body - What is evaluated. In body, `yield* result` and\n * `yield* resultAsync` work as Rust's `result?` expression.\n * @returns The first occurrence of either an yielded Err or a returned Result.\n */\ndeclare function safeTry(body: () => AsyncGenerator, Result>): ResultAsync;\ndeclare function safeTry, GeneratorReturnResult extends Result>(body: () => AsyncGenerator): ResultAsync, InferErrTypes | InferErrTypes>;\ninterface IResult {\n /**\n * Used to check if a `Result` is an `OK`\n *\n * @returns `true` if the result is an `OK` variant of Result\n */\n isOk(): this is Ok;\n /**\n * Used to check if a `Result` is an `Err`\n *\n * @returns `true` if the result is an `Err` variant of Result\n */\n isErr(): this is Err;\n /**\n * Maps a `Result` to `Result`\n * by applying a function to a contained `Ok` value, leaving an `Err` value\n * untouched.\n *\n * @param f The function to apply an `OK` value\n * @returns the result of applying `f` or an `Err` untouched\n */\n map(f: (t: T) => A): Result;\n /**\n * Maps a `Result` to `Result` by applying a function to a\n * contained `Err` value, leaving an `Ok` value untouched.\n *\n * This function can be used to pass through a successful result while\n * handling an error.\n *\n * @param f a function to apply to the error `Err` value\n */\n mapErr(f: (e: E) => U): Result;\n /**\n * Similar to `map` Except you must return a new `Result`.\n *\n * This is useful for when you need to do a subsequent computation using the\n * inner `T` value, but that computation might fail.\n * Additionally, `andThen` is really useful as a tool to flatten a\n * `Result, E1>` into a `Result` (see example below).\n *\n * @param f The function to apply to the current value\n */\n andThen>(f: (t: T) => R): Result, InferErrTypes | E>;\n andThen(f: (t: T) => Result): Result;\n /**\n * This \"tee\"s the current value to an passed-in computation such as side\n * effect functions but still returns the same current value as the result.\n *\n * This is useful when you want to pass the current result to your side-track\n * work such as logging but want to continue main-track work after that.\n * This method does not care about the result of the passed in computation.\n *\n * @param f The function to apply to the current value\n */\n andTee(f: (t: T) => unknown): Result;\n /**\n * This \"tee\"s the current `Err` value to an passed-in computation such as side\n * effect functions but still returns the same `Err` value as the result.\n *\n * This is useful when you want to pass the current `Err` value to your side-track\n * work such as logging but want to continue error-track work after that.\n * This method does not care about the result of the passed in computation.\n *\n * @param f The function to apply to the current `Err` value\n */\n orTee(f: (t: E) => unknown): Result;\n /**\n * Similar to `andTee` except error result of the computation will be passed\n * to the downstream in case of an error.\n *\n * This version is useful when you want to make side-effects but in case of an\n * error, you want to pass the error to the downstream.\n *\n * @param f The function to apply to the current value\n */\n andThrough>(f: (t: T) => R): Result | E>;\n andThrough(f: (t: T) => Result): Result;\n /**\n * Takes an `Err` value and maps it to a `Result`.\n *\n * This is useful for error recovery.\n *\n *\n * @param f A function to apply to an `Err` value, leaving `Ok` values\n * untouched.\n */\n orElse>(f: (e: E) => R): Result | T, InferErrTypes>;\n orElse(f: (e: E) => Result): Result;\n /**\n * Similar to `map` Except you must return a new `Result`.\n *\n * This is useful for when you need to do a subsequent async computation using\n * the inner `T` value, but that computation might fail. Must return a ResultAsync\n *\n * @param f The function that returns a `ResultAsync` to apply to the current\n * value\n */\n asyncAndThen(f: (t: T) => ResultAsync): ResultAsync;\n /**\n * Maps a `Result` to `ResultAsync`\n * by applying an async function to a contained `Ok` value, leaving an `Err`\n * value untouched.\n *\n * @param f An async function to apply an `OK` value\n */\n asyncMap(f: (t: T) => Promise): ResultAsync;\n /**\n * Unwrap the `Ok` value, or return the default if there is an `Err`\n *\n * @param v the default value to return if there is an `Err`\n */\n unwrapOr(v: A): T | A;\n /**\n *\n * Given 2 functions (one for the `Ok` variant and one for the `Err` variant)\n * execute the function that matches the `Result` variant.\n *\n * Match callbacks do not necessitate to return a `Result`, however you can\n * return a `Result` if you want to.\n *\n * `match` is like chaining `map` and `mapErr`, with the distinction that\n * with `match` both functions must have the same return type.\n *\n * @param ok\n * @param err\n */\n match(ok: (t: T) => A, err: (e: E) => B): A | B;\n /**\n * @deprecated will be removed in 9.0.0.\n *\n * You can use `safeTry` without this method.\n * @example\n * ```typescript\n * safeTry(function* () {\n * const okValue = yield* yourResult\n * })\n * ```\n * Emulates Rust's `?` operator in `safeTry`'s body. See also `safeTry`.\n */\n safeUnwrap(): Generator, T>;\n /**\n * **This method is unsafe, and should only be used in a test environments**\n *\n * Takes a `Result` and returns a `T` when the result is an `Ok`, otherwise it throws a custom object.\n *\n * @param config\n */\n _unsafeUnwrap(config?: ErrorConfig): T;\n /**\n * **This method is unsafe, and should only be used in a test environments**\n *\n * takes a `Result` and returns a `E` when the result is an `Err`,\n * otherwise it throws a custom object.\n *\n * @param config\n */\n _unsafeUnwrapErr(config?: ErrorConfig): E;\n}\ndeclare class Ok implements IResult {\n readonly value: T;\n constructor(value: T);\n isOk(): this is Ok;\n isErr(): this is Err;\n map(f: (t: T) => A): Result;\n mapErr(_f: (e: E) => U): Result;\n andThen>(f: (t: T) => R): Result, InferErrTypes | E>;\n andThen(f: (t: T) => Result): Result;\n andThrough>(f: (t: T) => R): Result | E>;\n andThrough(f: (t: T) => Result): Result;\n andTee(f: (t: T) => unknown): Result;\n orTee(_f: (t: E) => unknown): Result;\n orElse>(_f: (e: E) => R): Result | T, InferErrTypes>;\n orElse(_f: (e: E) => Result): Result;\n asyncAndThen(f: (t: T) => ResultAsync): ResultAsync;\n asyncAndThrough>(f: (t: T) => R): ResultAsync | E>;\n asyncAndThrough(f: (t: T) => ResultAsync): ResultAsync;\n asyncMap(f: (t: T) => Promise): ResultAsync;\n unwrapOr(_v: A): T | A;\n match(ok: (t: T) => A, _err: (e: E) => B): A | B;\n safeUnwrap(): Generator, T>;\n _unsafeUnwrap(_?: ErrorConfig): T;\n _unsafeUnwrapErr(config?: ErrorConfig): E;\n [Symbol.iterator](): Generator, T>;\n}\ndeclare class Err implements IResult {\n readonly error: E;\n constructor(error: E);\n isOk(): this is Ok;\n isErr(): this is Err;\n map(_f: (t: T) => A): Result;\n mapErr(f: (e: E) => U): Result;\n andThrough(_f: (t: T) => Result): Result;\n andTee(_f: (t: T) => unknown): Result;\n orTee(f: (t: E) => unknown): Result;\n andThen>(_f: (t: T) => R): Result, InferErrTypes | E>;\n andThen(_f: (t: T) => Result): Result;\n orElse>(f: (e: E) => R): Result | T, InferErrTypes>;\n orElse(f: (e: E) => Result): Result;\n asyncAndThen(_f: (t: T) => ResultAsync): ResultAsync;\n asyncAndThrough(_f: (t: T) => ResultAsync): ResultAsync;\n asyncMap(_f: (t: T) => Promise): ResultAsync;\n unwrapOr(v: A): T | A;\n match(_ok: (t: T) => A, err: (e: E) => B): A | B;\n safeUnwrap(): Generator, T>;\n _unsafeUnwrap(config?: ErrorConfig): T;\n _unsafeUnwrapErr(_?: ErrorConfig): E;\n [Symbol.iterator](): Generator, T>;\n}\ndeclare const fromThrowable: typeof Result.fromThrowable;\ndeclare type Prev = [\n never,\n 0,\n 1,\n 2,\n 3,\n 4,\n 5,\n 6,\n 7,\n 8,\n 9,\n 10,\n 11,\n 12,\n 13,\n 14,\n 15,\n 16,\n 17,\n 18,\n 19,\n 20,\n 21,\n 22,\n 23,\n 24,\n 25,\n 26,\n 27,\n 28,\n 29,\n 30,\n 31,\n 32,\n 33,\n 34,\n 35,\n 36,\n 37,\n 38,\n 39,\n 40,\n 41,\n 42,\n 43,\n 44,\n 45,\n 46,\n 47,\n 48,\n 49,\n ...0[]\n];\ndeclare type CollectResults = [\n Depth\n] extends [never] ? [] : T extends [infer H, ...infer Rest] ? H extends Result ? CollectResults : never : Collected;\ndeclare type Transpose = A extends [infer T, ...infer Rest] ? T extends [infer L, infer R] ? Transposed extends [infer PL, infer PR] ? PL extends unknown[] ? PR extends unknown[] ? Transpose : never : never : Transpose : Transposed : Transposed;\ndeclare type Combine = Transpose, [], Depth> extends [\n infer L,\n infer R\n] ? [UnknownMembersToNever, UnknownMembersToNever] : Transpose, [], Depth> extends [] ? [[], []] : never;\ndeclare type Dedup = T extends Result ? [unknown] extends [RL] ? Err : Ok : T;\ndeclare type MemberListOf = ((T extends unknown ? (t: T) => T : never) extends infer U ? (U extends unknown ? (u: U) => unknown : never) extends (v: infer V) => unknown ? V : never : never) extends (_: unknown) => infer W ? [...MemberListOf>, W] : [];\ndeclare type EmptyArrayToNever = T extends [] ? never : NeverArrayToNever extends 1 ? T extends [never, ...infer Rest] ? [EmptyArrayToNever] extends [never] ? never : T : T : T;\ndeclare type UnknownMembersToNever = T extends [infer H, ...infer R] ? [[unknown] extends [H] ? never : H, ...UnknownMembersToNever] : T;\ndeclare type MembersToUnion = T extends unknown[] ? T[number] : never;\ndeclare type IsLiteralArray = T extends {\n length: infer L;\n} ? L extends number ? number extends L ? 0 : 1 : 0 : 0;\ndeclare type Traverse = Combine extends [infer Oks, infer Errs] ? Result, MembersToUnion> : never;\ndeclare type TraverseWithAllErrors = Traverse extends Result ? Result : never;\ndeclare type CombineResults[]> = IsLiteralArray extends 1 ? Traverse : Result, ExtractErrTypes[number]>;\ndeclare type CombineResultsWithAllErrorsArray[]> = IsLiteralArray extends 1 ? TraverseWithAllErrors : Result, ExtractErrTypes[number][]>;\n\n\n\n// scale.d.ts (module-scope)\n\n/** SCALE codec primitives used by the generated client.\n *\n * Thin wrapper over `scale-ts`: re-exports its primitives and combinators,\n * plus the Polkadot-flavour helpers it does not ship (hex-encoded bytes,\n * lazy recursive codecs, and `V`-indexed tagged unions).\n */\nimport { type Codec, type ResultPayload } from \"scale-ts\";\nexport type { Codec };\nexport type { ResultPayload } from \"scale-ts\";\n/**\n * Bare-named type alias matching generated codegen's naming convention for\n * generic wire types: `Result` is used as both a value (the codec\n * builder re-exported below) and a type (this alias for scale-ts's own\n * `ResultPayload`) in generated `types.ts`.\n */\nexport type Result = ResultPayload;\nexport { Bytes, Enum, Option, Result, Struct, Tuple, Vector, _void, compact, i8, i16, i32, i64, i128, str, u8, u16, u32, u64, u128, } from \"scale-ts\";\n/** SCALE boolean, rejecting byte values Rust cannot decode. */\nexport declare const bool: Codec;\n/**\n * Substrate `OptionBool`: a one-byte `Option`.\n *\n * Canonical SCALE encoding (matches `parity_scale_codec::OptionBool`):\n * `undefined` \u2192 `0`, `true` \u2192 `1`, `false` \u2192 `2`.\n */\nexport declare const OptionBool: Codec;\n/** Hex-encoded byte string, e.g. `\"0xdeadbeef\"`. */\nexport type HexString = `0x${string}`;\n/** Assert that a string is a valid hex string (`0x...`). */\nexport declare function toHexString(value: string): HexString;\n/** Encode a byte array as a lower-case hex string with a `0x` prefix. */\nexport declare function bytesToHex(bytes: Uint8Array): HexString;\n/** Decode a hex string into a byte array. Tolerates a missing `0x` prefix. */\nexport declare function hexToBytes(hex: string): Uint8Array;\n/**\n * SCALE codec for hex-encoded byte strings.\n *\n * Encode accepts a `0x`-prefixed hex string and emits SCALE bytes; decode\n * returns the bytes as a hex string. Pass `length` for fixed-size byte arrays\n * (`[u8; N]`); omit it for variable-length byte vectors (`Vec`).\n */\nexport declare function Hex(length?: number): Codec;\n/**\n * Same wire format as `scale-ts`'s `Enum`, but exposes `value` as optional in\n * the public TS type when the variant codec is `Codec`. Lets unit\n * variants of mixed enums round-trip as `{ tag: \"X\" }` (no `value` key).\n */\nexport declare function TaggedUnion(inner: O): Codec>;\n/** Public TS value for Rust's derived `CallError` enum. */\nexport type CallErrorValue = {\n tag: \"Domain\";\n value: D;\n} | {\n tag: \"Denied\";\n value?: undefined;\n} | {\n tag: \"Unsupported\";\n value?: undefined;\n} | {\n tag: \"MalformedFrame\";\n value: {\n reason: string;\n };\n} | {\n tag: \"HostFailure\";\n value: {\n reason: string;\n };\n} | {\n tag: \"Cancelled\";\n value?: undefined;\n};\n/** SCALE codec for Rust's derived `CallError` enum. */\nexport declare function CallError(domain: Codec): Codec>;\ntype TaggedUnionCodecs = {\n [Sym: symbol]: never;\n [Num: number]: never;\n [Str: string]: Codec;\n};\ntype TaggedUnionValue = {\n [K in keyof O & string]: O[K] extends Codec ? [T] extends [undefined] ? {\n tag: K;\n value?: undefined;\n } : {\n tag: K;\n value: T;\n } : never;\n}[keyof O & string];\n/**\n * Enum without payloads \u2014 maps string labels to SCALE discriminant bytes.\n *\n * `scale-ts` models `Enum({ Foo: _void, Bar: _void })` as tagged objects. For\n * user-facing TrUAPI enums with only unit variants, we keep the public TS shape\n * as a plain string union instead.\n */\nexport declare function Status(...variants: readonly T[]): Codec;\n/**\n * Defers codec construction until first use so recursive generated codecs can\n * reference each other safely.\n */\nexport declare function lazy(factory: () => Codec): Codec;\ntype IndexedVariantCodec = readonly [index: number, codec: Codec];\ntype IndexedVariantValue>, K extends keyof Variants & string> = Variants[K] extends IndexedVariantCodec ? [T] extends [undefined] ? {\n tag: K;\n value?: undefined;\n} : {\n tag: K;\n value: T;\n} : never;\n/**\n * Builds a tagged union codec with explicit SCALE discriminants.\n *\n * `scale-ts` assigns enum indexes by object key order. TrUAPI versioned enums pin\n * `V` to index `N - 1`, including V2-only enums, so generated codecs use this\n * helper for versioned wire wrappers.\n */\nexport declare function indexedTaggedUnion>>(variants: Variants): Codec<{\n [K in keyof Variants & string]: IndexedVariantValue;\n}[keyof Variants & string]>;\n\n\n// generated/types.d.ts (namespace T)\n\ndeclare namespace T {\n/**\n * A press on a button the host draws for a `ChatMessageContent::Actions`\n * message.\n */\nexport interface ActionTrigger {\n /**\n * Message containing the action, as returned by `Chat::post_message` in\n * [`HostChatPostMessageResponse::message_id`].\n */\n messageId: string;\n /** Which action was triggered. */\n actionId: string;\n /** Optional additional data. */\n payload?: HexString;\n}\nexport const ActionTrigger: Codec;\n/**\n * A resource the host can pre-allocate on behalf of the product (RFC 0010).\n *\n * For the slot-table allowances (`StatementStoreAllowance`,\n * `BulletinAllowance`, `SmartContractAllowance`), pre-allocation is\n * opportunistic and the host may also fulfil the allowance implicitly on the\n * first submission. `AutoSigning` must be requested explicitly through this\n * call.\n */\nexport type AllocatableResource = \n/** Statement Store slot allowance for the product's own allowance account. */\n{\n tag: \"StatementStoreAllowance\";\n value?: undefined;\n}\n/** Bulletin chain slot allowance for the product's own allowance account. */\n | {\n tag: \"BulletinAllowance\";\n value?: undefined;\n}\n/**\n * Pre-warmed PGAS balance for the product account selected by this\n * derivation index.\n */\n | {\n tag: \"SmartContractAllowance\";\n value: DerivationIndex;\n}\n/** Permission to sign on the product's behalf without per-call user prompts. */\n | {\n tag: \"AutoSigning\";\n value?: undefined;\n};\nexport const AllocatableResource: Codec;\n/** Outcome of allocating a single resource (RFC 0010). */\nexport type AllocationOutcome = \"Allocated\" | \"Rejected\" | \"NotAvailable\";\nexport const AllocationOutcome: Codec;\n/** Main-axis distribution of children. */\nexport type Arrangement = \"Start\" | \"End\" | \"Center\" | \"SpaceBetween\" | \"SpaceAround\" | \"SpaceEvenly\";\nexport const Arrangement: Codec;\n/** Background styling. */\nexport interface Background {\n /** Background color. */\n color: ColorToken;\n /** Background shape. */\n shape?: Shape;\n}\nexport const Background: Codec;\n/**\n * How a node composites with what is behind it. The values are those common\n * to CSS `mix-blend-mode`, SwiftUI `BlendMode` and Compose `BlendMode`.\n */\nexport type BlendingMode = \"Normal\" | \"Multiply\" | \"Screen\" | \"Overlay\" | \"Darken\" | \"Lighten\" | \"ColorDodge\" | \"ColorBurn\" | \"HardLight\" | \"SoftLight\" | \"Difference\" | \"Exclusion\" | \"Hue\" | \"Saturation\" | \"Color\" | \"Luminosity\";\nexport const BlendingMode: Codec;\n/** Border styling. */\nexport interface BorderStyle {\n /** Border width. */\n width: Size;\n /** Border color. */\n color: ColorToken;\n /** Border shape. */\n shape?: Shape;\n}\nexport const BorderStyle: Codec;\n/** Properties of a `Box`. */\nexport interface BoxProps {\n /** Placement of content within the box. */\n contentAlignment?: ContentAlignment;\n}\nexport const BoxProps: Codec;\n/** Properties of a `Button`. */\nexport interface ButtonProps {\n /** Button label. */\n text: string;\n /** Button emphasis. */\n variant?: ButtonVariant;\n /** Whether the button accepts presses. Absent leaves the default to the host. */\n enabled?: boolean;\n /**\n * Whether the button shows a loading state. A loading button accepts no\n * presses. Absent leaves the default to the host.\n */\n loading?: boolean;\n /** Action triggered on press. A button without one is inert. */\n clickAction?: string;\n}\nexport const ButtonProps: Codec;\n/** Button emphasis. */\nexport type ButtonVariant = \"Primary\" | \"Secondary\" | \"Text\";\nexport const ButtonVariant: Codec;\n/**\n * A 32-byte value, passed as plain bytes on FFI surfaces. Version-neutral:\n * the FFI conversion below applies to `[u8; 32]` fields in every protocol\n * version.\n */\nexport type Bytes32 = HexString;\nexport const Bytes32: Codec;\n/** Role of a chain within the host's configured environment. */\nexport type ChainIdentifier = \"Relay\" | \"AssetHub\" | \"People\" | \"Bulletin\";\nexport const ChainIdentifier: Codec;\n/** A clickable action button in a chat message. */\nexport interface ChatAction {\n /** Action identifier. */\n actionId: string;\n /** Button label. */\n title: string;\n}\nexport const ChatAction: Codec;\n/** Layout for action buttons. */\nexport type ChatActionLayout = \"Column\" | \"Grid\";\nexport const ChatActionLayout: Codec;\n/** Payload of a received chat action. */\nexport type ChatActionPayload = \n/** A peer posted a message. */\n{\n tag: \"MessagePosted\";\n value: ChatMessageContent;\n}\n/** A user pressed a host-drawn `Actions` button. */\n | {\n tag: \"ActionTriggered\";\n value: ActionTrigger;\n}\n/** A user issued a command. */\n | {\n tag: \"Command\";\n value: ChatCommand;\n};\nexport const ChatActionPayload: Codec;\n/** A set of action buttons with optional text. */\nexport interface ChatActions {\n /** Optional message text. */\n text?: string;\n /** List of action buttons. */\n actions: Array;\n /** `Column` or `Grid` layout. */\n layout: ChatActionLayout;\n}\nexport const ChatActions: Codec;\n/** Whether the bot was newly registered or already existed. */\nexport type ChatBotRegistrationStatus = \"New\" | \"Exists\";\nexport const ChatBotRegistrationStatus: Codec;\n/** A slash command from a chat user. */\nexport interface ChatCommand {\n /** Command name. */\n command: string;\n /** Command arguments. */\n payload: string;\n}\nexport const ChatCommand: Codec;\n/**\n * A custom message with application-defined type and binary payload. The\n * host draws it through `Renderer::render`, with a `ChatMessage` context\n * carrying `message_type` and `payload` as the render payload.\n */\nexport interface ChatCustomMessage {\n /** Application-defined type key. */\n messageType: string;\n /** Binary payload. */\n payload: HexString;\n}\nexport const ChatCustomMessage: Codec;\n/** A file attachment in a chat message. */\nexport interface ChatFile {\n /** File download URL. */\n url: string;\n /** File name. */\n fileName: string;\n /** MIME type. */\n mimeType: string;\n /** File size in bytes. */\n sizeBytes: bigint;\n /** Optional caption text. */\n text?: string;\n}\nexport const ChatFile: Codec;\n/** A media attachment. */\nexport interface ChatMedia {\n /** Media URL. */\n url: string;\n}\nexport const ChatMedia: Codec;\n/** Content of a chat message -- one of several types. */\nexport type ChatMessageContent = \n/** Plain text message. */\n{\n tag: \"Text\";\n value: {\n text: string;\n };\n}\n/** Rich text with media. */\n | {\n tag: \"RichText\";\n value: ChatRichText;\n}\n/** Action button set. */\n | {\n tag: \"Actions\";\n value: ChatActions;\n}\n/** File attachment. */\n | {\n tag: \"File\";\n value: ChatFile;\n}\n/** Emoji reaction. */\n | {\n tag: \"Reaction\";\n value: ChatReaction;\n}\n/** Reaction removal. */\n | {\n tag: \"ReactionRemoved\";\n value: ChatReaction;\n}\n/** Custom message. */\n | {\n tag: \"Custom\";\n value: ChatCustomMessage;\n};\nexport const ChatMessageContent: Codec;\n/** A reaction to a chat message. */\nexport interface ChatReaction {\n /** Message being reacted to. */\n messageId: string;\n /** Emoji reaction. */\n emoji: string;\n}\nexport const ChatReaction: Codec;\n/** Rich text message with optional media. */\nexport interface ChatRichText {\n /** Optional text content. */\n text?: string;\n /** Attached media items. */\n media: Array;\n}\nexport const ChatRichText: Codec;\n/** A chat room the product participates in. */\nexport interface ChatRoom {\n /** Room identifier. */\n roomId: string;\n /** `RoomHost` or `Bot`. */\n participatingAs: ChatRoomParticipation;\n}\nexport const ChatRoom: Codec;\n/** How the product participates in a chat room. */\nexport type ChatRoomParticipation = \"RoomHost\" | \"Bot\";\nexport const ChatRoomParticipation: Codec;\n/** Whether the room was newly created or already existed. */\nexport type ChatRoomRegistrationStatus = \"New\" | \"Exists\";\nexport const ChatRoomRegistrationStatus: Codec;\n/** Standardized encrypted Coinage secret transmission payload. */\nexport interface CoinPaymentCheque {\n /** Receivable public key protecting the cheque contents. */\n id: HexString;\n /** Claimed payment amount. */\n amount: number;\n /** Concatenated coin secrets encrypted to the receivable. */\n encryptedSecrets: HexString;\n}\nexport const CoinPaymentCheque: Codec;\n/** Product-visible clearing reference for reconciliation and receipts. */\nexport interface CoinPaymentClearingReference {\n /** Clearing Merkle root. */\n root: HexString;\n /** Product-visible coin key and transaction hash leaves. */\n leaves: Array<[HexString, HexString]>;\n}\nexport const CoinPaymentClearingReference: Codec;\n/** Errors returned by CoinPayment host operations. */\nexport type CoinPaymentError = \"BalanceLow\" | \"Denied\" | \"BadCoins\" | \"SnipedCoins\" | \"PurseNotFound\" | \"ReceivableNotFound\" | \"UnsupportedChannel\" | \"UserAgentCapabilityUnavailable\" | \"Internal\";\nexport const CoinPaymentError: Codec;\n/** Product-visible metadata and balance state for a CoinPayment purse. */\nexport interface CoinPaymentPurseInfo {\n /** Human-readable purse name supplied by the creating product. */\n name: string;\n /** Creation timestamp. */\n created: bigint;\n /** Product that created the purse. */\n creator: string;\n /** Current product-visible balance. */\n balance: number;\n}\nexport const CoinPaymentPurseInfo: Codec;\n/** Clearing status stream item. */\nexport type CoinPaymentStatus = \n/** More coins have cleared. */\n{\n tag: \"Clearing\";\n value: {\n clearing: number;\n cleared: number;\n };\n}\n/** Some or all coins failed to transfer. */\n | {\n tag: \"Failed\";\n value: {\n error: CoinPaymentError;\n cleared: number;\n reference: CoinPaymentClearingReference;\n };\n}\n/** All coins cleared. */\n | {\n tag: \"Done\";\n value: {\n cleared: number;\n reference: CoinPaymentClearingReference;\n };\n};\nexport const CoinPaymentStatus: Codec;\n/** Standardized cheque transmission channel. */\nexport type CoinPaymentTransmissionChannel = \n/** Statement-store/HOP handoff identified by an SSS topic. */\n{\n tag: \"Standard\";\n value: {\n sssTopic: HexString;\n };\n};\nexport const CoinPaymentTransmissionChannel: Codec;\n/** Semantic color tokens, resolved by the host's theme. */\nexport type ColorToken = \"FgPrimary\" | \"FgSecondary\" | \"FgTertiary\" | \"BgSurfaceMain\" | \"BgSurfaceContainer\" | \"BgSurfaceNested\" | \"FgSuccess\" | \"FgError\" | \"FgWarning\";\nexport const ColorToken: Codec;\n/** Properties of a `Column`. */\nexport interface ColumnProps {\n /** Cross-axis alignment of children. */\n horizontalAlignment?: HorizontalAlignment;\n /** Main-axis distribution of children. */\n verticalArrangement?: Arrangement;\n}\nexport const ColumnProps: Codec;\n/**\n * A contact as a product knows them: 32 bytes and nothing else.\n *\n * Its own type rather than a bare [`Bytes32`], because an account id is also\n * 32 bytes. A product that could pass one where the other is expected would\n * build a valid-looking transfer to an address nobody controls. A handle is\n * not an address, and the type is where that is said.\n */\nexport interface ContactHandle {\n /** The handle's bytes. */\n bytes: Bytes32;\n}\nexport const ContactHandle: Codec;\n/**\n * How a contact pick ended.\n *\n * Distinguishing these matters to a product deciding what to do next: a\n * dismissal is worth retrying, an empty list is not.\n */\nexport type ContactPickOutcome = \n/**\n * The user chose someone.\n *\n * `handle` is the same value for this person in every product, and on every\n * host of this user. It is not an address and cannot be turned into one:\n * the core resolves it when it builds a transaction, so a product can name\n * a recipient it never learns the account of.\n */\n{\n tag: \"Picked\";\n value: {\n handle: ContactHandle;\n };\n}\n/** The user closed the picker without choosing. */\n | {\n tag: \"Dismissed\";\n value?: undefined;\n}\n/** The user has no contacts, so no picker was shown. */\n | {\n tag: \"NoContacts\";\n value?: undefined;\n};\nexport const ContactPickOutcome: Codec;\n/** Placement of content within a `Box`. */\nexport type ContentAlignment = \"TopStart\" | \"TopCenter\" | \"TopEnd\" | \"CenterStart\" | \"Center\" | \"CenterEnd\" | \"BottomStart\" | \"BottomCenter\" | \"BottomEnd\";\nexport const ContentAlignment: Codec;\n/** A privacy-preserving alias derived via ring VRF, bound to a specific context. */\nexport interface ContextualAlias {\n /** 32-byte context identifier the alias is bound to. */\n context: HexString;\n /** Ring VRF alias (variable length). */\n alias: HexString;\n}\nexport const ContextualAlias: Codec;\n/**\n * Account selector within a product subtree. Encodes as\n * `Either` on the wire (`Index` = left, `Raw` = right).\n *\n * `Index` is the primary form \u2014 plain indices keep a product's accounts\n * enumerable. `Raw` carries a raw 32-byte derivation index for cases where\n * bytes are genuinely necessary. Hosts expand `Index(n)` to the internal\n * 32-byte index (`u32` little-endian plus the index magic).\n */\nexport type DerivationIndex = \n/** Plain account index. */\n{\n tag: \"Index\";\n value: number;\n}\n/** Raw 32-byte derivation index. */\n | {\n tag: \"Raw\";\n value: HexString;\n};\nexport const DerivationIndex: Codec;\n/** Edge dimensions. `bottom` defaults to `top` and `start` to `end` when absent. */\nexport interface Dimensions {\n /** Top edge. */\n top: Size;\n /** End edge. */\n end: Size;\n /** Bottom edge; defaults to `top`. */\n bottom?: Size;\n /** Start edge; defaults to `end`. */\n start?: Size;\n}\nexport const Dimensions: Codec;\n/** A visual effect. Each variant names one effect and carries its parameters. */\nexport type Effect = \"Rainbow\";\nexport const Effect: Codec;\n/** Properties of an `Effect`. */\nexport interface EffectProps {\n /** The effect applied to the children. */\n effect: Effect;\n}\nexport const EffectProps: Codec;\n/**\n * Generic error payload carrying a human-readable reason string. Used by many\n * methods as a catch-all error type.\n */\nexport interface GenericError {\n /** Human-readable failure reason. */\n reason: string;\n}\nexport const GenericError: Codec;\n/** Cross-axis alignment of `Column` children. */\nexport type HorizontalAlignment = \"Start\" | \"Center\" | \"End\";\nexport const HorizontalAlignment: Codec;\n/** Versioned envelope for [`HostAccountConnectionStatusSubscribeError`]. */\nexport type VersionedHostAccountConnectionStatusSubscribeError = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: GenericError;\n};\nexport const VersionedHostAccountConnectionStatusSubscribeError: Codec;\n/** Versioned envelope for [`HostAccountConnectionStatusSubscribeItem`]. */\nexport type VersionedHostAccountConnectionStatusSubscribeItem = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostAccountConnectionStatusSubscribeItem;\n};\nexport const VersionedHostAccountConnectionStatusSubscribeItem: Codec;\n/** Versioned envelope for [`HostAccountConnectionStatusSubscribeRequest`]. */\nexport type VersionedHostAccountConnectionStatusSubscribeRequest = \n/** Version 1 (no payload). */\n{\n tag: \"V1\";\n value?: undefined;\n};\nexport const VersionedHostAccountConnectionStatusSubscribeRequest: Codec;\n/** Versioned envelope for [`HostAccountCreateProofError`]. */\nexport type VersionedHostAccountCreateProofError = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostAccountCreateProofError;\n};\nexport const VersionedHostAccountCreateProofError: Codec;\n/** Versioned envelope for [`HostAccountCreateProofRequest`]. */\nexport type VersionedHostAccountCreateProofRequest = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostAccountCreateProofRequest;\n};\nexport const VersionedHostAccountCreateProofRequest: Codec;\n/** Versioned envelope for [`HostAccountCreateProofResponse`]. */\nexport type VersionedHostAccountCreateProofResponse = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostAccountCreateProofResponse;\n};\nexport const VersionedHostAccountCreateProofResponse: Codec;\n/** Versioned envelope for [`HostAccountGetAliasError`]. */\nexport type VersionedHostAccountGetAliasError = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostAccountGetAliasError;\n};\nexport const VersionedHostAccountGetAliasError: Codec;\n/** Versioned envelope for [`HostAccountGetAliasRequest`]. */\nexport type VersionedHostAccountGetAliasRequest = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostAccountGetAliasRequest;\n};\nexport const VersionedHostAccountGetAliasRequest: Codec;\n/** Versioned envelope for [`HostAccountGetAliasResponse`]. */\nexport type VersionedHostAccountGetAliasResponse = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: ContextualAlias;\n};\nexport const VersionedHostAccountGetAliasResponse: Codec;\n/** Versioned envelope for [`HostAccountGetError`]. */\nexport type VersionedHostAccountGetError = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostAccountGetError;\n};\nexport const VersionedHostAccountGetError: Codec;\n/** Versioned envelope for [`HostAccountGetRequest`]. */\nexport type VersionedHostAccountGetRequest = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostAccountGetRequest;\n};\nexport const VersionedHostAccountGetRequest: Codec;\n/** Versioned envelope for [`HostAccountGetResponse`]. */\nexport type VersionedHostAccountGetResponse = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostAccountGetResponse;\n};\nexport const VersionedHostAccountGetResponse: Codec;\n/** Versioned envelope for [`HostAccountListRingVrfKeysError`]. */\nexport type VersionedHostAccountListRingVrfKeysError = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostAccountListRingVrfKeysError;\n};\nexport const VersionedHostAccountListRingVrfKeysError: Codec;\n/** Versioned envelope for [`HostAccountListRingVrfKeysRequest`]. */\nexport type VersionedHostAccountListRingVrfKeysRequest = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostAccountListRingVrfKeysRequest;\n};\nexport const VersionedHostAccountListRingVrfKeysRequest: Codec;\n/** Versioned envelope for [`HostAccountListRingVrfKeysResponse`]. */\nexport type VersionedHostAccountListRingVrfKeysResponse = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: Array;\n};\nexport const VersionedHostAccountListRingVrfKeysResponse: Codec;\n/** Versioned envelope for [`HostAccountRegisterRingVrfKeyError`]. */\nexport type VersionedHostAccountRegisterRingVrfKeyError = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostAccountRegisterRingVrfKeyError;\n};\nexport const VersionedHostAccountRegisterRingVrfKeyError: Codec;\n/** Versioned envelope for [`HostAccountRegisterRingVrfKeyRequest`]. */\nexport type VersionedHostAccountRegisterRingVrfKeyRequest = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostAccountRegisterRingVrfKeyRequest;\n};\nexport const VersionedHostAccountRegisterRingVrfKeyRequest: Codec;\n/** Versioned envelope for [`HostAccountRegisterRingVrfKeyResponse`]. */\nexport type VersionedHostAccountRegisterRingVrfKeyResponse = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HexString;\n};\nexport const VersionedHostAccountRegisterRingVrfKeyResponse: Codec;\n/** Versioned envelope for [`HostAccountRingVrfSignError`]. */\nexport type VersionedHostAccountRingVrfSignError = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostAccountRingVrfSignError;\n};\nexport const VersionedHostAccountRingVrfSignError: Codec;\n/** Versioned envelope for [`HostAccountRingVrfSignRequest`]. */\nexport type VersionedHostAccountRingVrfSignRequest = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostAccountRingVrfSignRequest;\n};\nexport const VersionedHostAccountRingVrfSignRequest: Codec;\n/** Versioned envelope for [`HostAccountRingVrfSignResponse`]. */\nexport type VersionedHostAccountRingVrfSignResponse = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HexString;\n};\nexport const VersionedHostAccountRingVrfSignResponse: Codec;\n/** Versioned envelope for [`HostAccountSignVrfError`]. */\nexport type VersionedHostAccountSignVrfError = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostAccountSignVrfError;\n};\nexport const VersionedHostAccountSignVrfError: Codec;\n/** Versioned envelope for [`HostAccountSignVrfRequest`]. */\nexport type VersionedHostAccountSignVrfRequest = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostAccountSignVrfRequest;\n};\nexport const VersionedHostAccountSignVrfRequest: Codec;\n/** Versioned envelope for [`HostAccountSignVrfResponse`]. */\nexport type VersionedHostAccountSignVrfResponse = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: VrfSignature;\n};\nexport const VersionedHostAccountSignVrfResponse: Codec;\n/** Versioned envelope for [`HostChatActionSubscribeError`]. */\nexport type VersionedHostChatActionSubscribeError = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: GenericError;\n};\nexport const VersionedHostChatActionSubscribeError: Codec;\n/** Versioned envelope for [`HostChatActionSubscribeItem`]. */\nexport type VersionedHostChatActionSubscribeItem = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostChatActionSubscribeItem;\n};\nexport const VersionedHostChatActionSubscribeItem: Codec;\n/** Versioned envelope for [`HostChatActionSubscribeRequest`]. */\nexport type VersionedHostChatActionSubscribeRequest = \n/** Version 1 (no payload). */\n{\n tag: \"V1\";\n value?: undefined;\n};\nexport const VersionedHostChatActionSubscribeRequest: Codec;\n/** Versioned envelope for [`HostChatCreateRoomError`]. */\nexport type VersionedHostChatCreateRoomError = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostChatCreateRoomError;\n};\nexport const VersionedHostChatCreateRoomError: Codec;\n/** Versioned envelope for [`HostChatCreateRoomRequest`]. */\nexport type VersionedHostChatCreateRoomRequest = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostChatCreateRoomRequest;\n};\nexport const VersionedHostChatCreateRoomRequest: Codec;\n/** Versioned envelope for [`HostChatCreateRoomResponse`]. */\nexport type VersionedHostChatCreateRoomResponse = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostChatCreateRoomResponse;\n};\nexport const VersionedHostChatCreateRoomResponse: Codec;\n/** Versioned envelope for [`HostChatListSubscribeError`]. */\nexport type VersionedHostChatListSubscribeError = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: GenericError;\n};\nexport const VersionedHostChatListSubscribeError: Codec;\n/** Versioned envelope for [`HostChatListSubscribeItem`]. */\nexport type VersionedHostChatListSubscribeItem = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostChatListSubscribeItem;\n};\nexport const VersionedHostChatListSubscribeItem: Codec;\n/** Versioned envelope for [`HostChatListSubscribeRequest`]. */\nexport type VersionedHostChatListSubscribeRequest = \n/** Version 1 (no payload). */\n{\n tag: \"V1\";\n value?: undefined;\n};\nexport const VersionedHostChatListSubscribeRequest: Codec;\n/** Versioned envelope for [`HostChatPostMessageError`]. */\nexport type VersionedHostChatPostMessageError = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostChatPostMessageError;\n};\nexport const VersionedHostChatPostMessageError: Codec;\n/** Versioned envelope for [`HostChatPostMessageRequest`]. */\nexport type VersionedHostChatPostMessageRequest = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostChatPostMessageRequest;\n};\nexport const VersionedHostChatPostMessageRequest: Codec;\n/** Versioned envelope for [`HostChatPostMessageResponse`]. */\nexport type VersionedHostChatPostMessageResponse = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostChatPostMessageResponse;\n};\nexport const VersionedHostChatPostMessageResponse: Codec;\n/** Versioned envelope for [`HostChatRegisterBotError`]. */\nexport type VersionedHostChatRegisterBotError = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostChatRegisterBotError;\n};\nexport const VersionedHostChatRegisterBotError: Codec;\n/** Versioned envelope for [`HostChatRegisterBotRequest`]. */\nexport type VersionedHostChatRegisterBotRequest = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostChatRegisterBotRequest;\n};\nexport const VersionedHostChatRegisterBotRequest: Codec;\n/** Versioned envelope for [`HostChatRegisterBotResponse`]. */\nexport type VersionedHostChatRegisterBotResponse = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostChatRegisterBotResponse;\n};\nexport const VersionedHostChatRegisterBotResponse: Codec;\n/** Versioned envelope for [`HostCoinPaymentCreateChequeError`]. */\nexport type VersionedHostCoinPaymentCreateChequeError = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: CoinPaymentError;\n};\nexport const VersionedHostCoinPaymentCreateChequeError: Codec;\n/** Versioned envelope for [`HostCoinPaymentCreateChequeRequest`]. */\nexport type VersionedHostCoinPaymentCreateChequeRequest = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostCoinPaymentCreateChequeRequest;\n};\nexport const VersionedHostCoinPaymentCreateChequeRequest: Codec;\n/** Versioned envelope for [`HostCoinPaymentCreateChequeResponse`]. */\nexport type VersionedHostCoinPaymentCreateChequeResponse = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostCoinPaymentCreateChequeResponse;\n};\nexport const VersionedHostCoinPaymentCreateChequeResponse: Codec;\n/** Versioned envelope for [`HostCoinPaymentCreatePurseError`]. */\nexport type VersionedHostCoinPaymentCreatePurseError = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: CoinPaymentError;\n};\nexport const VersionedHostCoinPaymentCreatePurseError: Codec;\n/** Versioned envelope for [`HostCoinPaymentCreatePurseRequest`]. */\nexport type VersionedHostCoinPaymentCreatePurseRequest = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostCoinPaymentCreatePurseRequest;\n};\nexport const VersionedHostCoinPaymentCreatePurseRequest: Codec;\n/** Versioned envelope for [`HostCoinPaymentCreatePurseResponse`]. */\nexport type VersionedHostCoinPaymentCreatePurseResponse = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostCoinPaymentCreatePurseResponse;\n};\nexport const VersionedHostCoinPaymentCreatePurseResponse: Codec;\n/** Versioned envelope for [`HostCoinPaymentCreateReceivableError`]. */\nexport type VersionedHostCoinPaymentCreateReceivableError = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: CoinPaymentError;\n};\nexport const VersionedHostCoinPaymentCreateReceivableError: Codec;\n/** Versioned envelope for [`HostCoinPaymentCreateReceivableRequest`]. */\nexport type VersionedHostCoinPaymentCreateReceivableRequest = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostCoinPaymentCreateReceivableRequest;\n};\nexport const VersionedHostCoinPaymentCreateReceivableRequest: Codec;\n/** Versioned envelope for [`HostCoinPaymentCreateReceivableResponse`]. */\nexport type VersionedHostCoinPaymentCreateReceivableResponse = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostCoinPaymentCreateReceivableResponse;\n};\nexport const VersionedHostCoinPaymentCreateReceivableResponse: Codec;\n/** Versioned envelope for [`HostCoinPaymentDeletePurseError`]. */\nexport type VersionedHostCoinPaymentDeletePurseError = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: CoinPaymentError;\n};\nexport const VersionedHostCoinPaymentDeletePurseError: Codec;\n/** Versioned envelope for [`HostCoinPaymentDeletePurseItem`]. */\nexport type VersionedHostCoinPaymentDeletePurseItem = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: CoinPaymentStatus;\n};\nexport const VersionedHostCoinPaymentDeletePurseItem: Codec;\n/** Versioned envelope for [`HostCoinPaymentDeletePurseRequest`]. */\nexport type VersionedHostCoinPaymentDeletePurseRequest = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostCoinPaymentDeletePurseRequest;\n};\nexport const VersionedHostCoinPaymentDeletePurseRequest: Codec;\n/** Versioned envelope for [`HostCoinPaymentDepositError`]. */\nexport type VersionedHostCoinPaymentDepositError = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: CoinPaymentError;\n};\nexport const VersionedHostCoinPaymentDepositError: Codec;\n/** Versioned envelope for [`HostCoinPaymentDepositItem`]. */\nexport type VersionedHostCoinPaymentDepositItem = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: CoinPaymentStatus;\n};\nexport const VersionedHostCoinPaymentDepositItem: Codec;\n/** Versioned envelope for [`HostCoinPaymentDepositRequest`]. */\nexport type VersionedHostCoinPaymentDepositRequest = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostCoinPaymentDepositRequest;\n};\nexport const VersionedHostCoinPaymentDepositRequest: Codec;\n/** Versioned envelope for [`HostCoinPaymentListenForError`]. */\nexport type VersionedHostCoinPaymentListenForError = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: CoinPaymentError;\n};\nexport const VersionedHostCoinPaymentListenForError: Codec;\n/** Versioned envelope for [`HostCoinPaymentListenForItem`]. */\nexport type VersionedHostCoinPaymentListenForItem = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostCoinPaymentListenForItem;\n};\nexport const VersionedHostCoinPaymentListenForItem: Codec;\n/** Versioned envelope for [`HostCoinPaymentListenForRequest`]. */\nexport type VersionedHostCoinPaymentListenForRequest = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostCoinPaymentListenForRequest;\n};\nexport const VersionedHostCoinPaymentListenForRequest: Codec;\n/** Versioned envelope for [`HostCoinPaymentQueryPurseError`]. */\nexport type VersionedHostCoinPaymentQueryPurseError = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: CoinPaymentError;\n};\nexport const VersionedHostCoinPaymentQueryPurseError: Codec;\n/** Versioned envelope for [`HostCoinPaymentQueryPurseRequest`]. */\nexport type VersionedHostCoinPaymentQueryPurseRequest = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostCoinPaymentQueryPurseRequest;\n};\nexport const VersionedHostCoinPaymentQueryPurseRequest: Codec;\n/** Versioned envelope for [`HostCoinPaymentQueryPurseResponse`]. */\nexport type VersionedHostCoinPaymentQueryPurseResponse = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostCoinPaymentQueryPurseResponse;\n};\nexport const VersionedHostCoinPaymentQueryPurseResponse: Codec;\n/** Versioned envelope for [`HostCoinPaymentRebalancePurseError`]. */\nexport type VersionedHostCoinPaymentRebalancePurseError = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: CoinPaymentError;\n};\nexport const VersionedHostCoinPaymentRebalancePurseError: Codec;\n/** Versioned envelope for [`HostCoinPaymentRebalancePurseItem`]. */\nexport type VersionedHostCoinPaymentRebalancePurseItem = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: CoinPaymentStatus;\n};\nexport const VersionedHostCoinPaymentRebalancePurseItem: Codec;\n/** Versioned envelope for [`HostCoinPaymentRebalancePurseRequest`]. */\nexport type VersionedHostCoinPaymentRebalancePurseRequest = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostCoinPaymentRebalancePurseRequest;\n};\nexport const VersionedHostCoinPaymentRebalancePurseRequest: Codec;\n/** Versioned envelope for [`HostCoinPaymentRefundError`]. */\nexport type VersionedHostCoinPaymentRefundError = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: CoinPaymentError;\n};\nexport const VersionedHostCoinPaymentRefundError: Codec;\n/** Versioned envelope for [`HostCoinPaymentRefundItem`]. */\nexport type VersionedHostCoinPaymentRefundItem = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: CoinPaymentStatus;\n};\nexport const VersionedHostCoinPaymentRefundItem: Codec;\n/** Versioned envelope for [`HostCoinPaymentRefundRequest`]. */\nexport type VersionedHostCoinPaymentRefundRequest = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostCoinPaymentRefundRequest;\n};\nexport const VersionedHostCoinPaymentRefundRequest: Codec;\n/** Versioned envelope for [`HostContactsPickError`]. */\nexport type VersionedHostContactsPickError = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostContactsPickError;\n};\nexport const VersionedHostContactsPickError: Codec;\n/** Versioned envelope for [`HostContactsPickRequest`]. */\nexport type VersionedHostContactsPickRequest = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostContactsPickRequest;\n};\nexport const VersionedHostContactsPickRequest: Codec;\n/** Versioned envelope for [`HostContactsPickResponse`]. */\nexport type VersionedHostContactsPickResponse = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostContactsPickResponse;\n};\nexport const VersionedHostContactsPickResponse: Codec;\n/** Versioned envelope for [`HostCreateTransactionError`]. */\nexport type VersionedHostCreateTransactionError = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostCreateTransactionError;\n};\nexport const VersionedHostCreateTransactionError: Codec;\n/** Versioned envelope for [`HostCreateTransactionRequest`]. */\nexport type VersionedHostCreateTransactionRequest = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: ProductAccountTxPayload;\n};\nexport const VersionedHostCreateTransactionRequest: Codec;\n/** Versioned envelope for [`HostCreateTransactionResponse`]. */\nexport type VersionedHostCreateTransactionResponse = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostCreateTransactionResponse;\n};\nexport const VersionedHostCreateTransactionResponse: Codec;\n/** Versioned envelope for [`HostCreateTransactionWithLegacyAccountError`]. */\nexport type VersionedHostCreateTransactionWithLegacyAccountError = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostCreateTransactionError;\n};\nexport const VersionedHostCreateTransactionWithLegacyAccountError: Codec;\n/** Versioned envelope for [`HostCreateTransactionWithLegacyAccountRequest`]. */\nexport type VersionedHostCreateTransactionWithLegacyAccountRequest = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: LegacyAccountTxPayload;\n};\nexport const VersionedHostCreateTransactionWithLegacyAccountRequest: Codec;\n/** Versioned envelope for [`HostCreateTransactionWithLegacyAccountResponse`]. */\nexport type VersionedHostCreateTransactionWithLegacyAccountResponse = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostCreateTransactionWithLegacyAccountResponse;\n};\nexport const VersionedHostCreateTransactionWithLegacyAccountResponse: Codec;\n/** Versioned envelope for [`HostDeriveEntropyError`]. */\nexport type VersionedHostDeriveEntropyError = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostDeriveEntropyError;\n};\nexport const VersionedHostDeriveEntropyError: Codec;\n/** Versioned envelope for [`HostDeriveEntropyRequest`]. */\nexport type VersionedHostDeriveEntropyRequest = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostDeriveEntropyRequest;\n};\nexport const VersionedHostDeriveEntropyRequest: Codec;\n/** Versioned envelope for [`HostDeriveEntropyResponse`]. */\nexport type VersionedHostDeriveEntropyResponse = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostDeriveEntropyResponse;\n};\nexport const VersionedHostDeriveEntropyResponse: Codec;\n/** Versioned envelope for [`HostDevicePermissionError`]. */\nexport type VersionedHostDevicePermissionError = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: GenericError;\n};\nexport const VersionedHostDevicePermissionError: Codec;\n/** Versioned envelope for [`HostDevicePermissionRequest`]. */\nexport type VersionedHostDevicePermissionRequest = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostDevicePermissionRequest;\n};\nexport const VersionedHostDevicePermissionRequest: Codec;\n/** Versioned envelope for [`HostDevicePermissionResponse`]. */\nexport type VersionedHostDevicePermissionResponse = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostDevicePermissionResponse;\n};\nexport const VersionedHostDevicePermissionResponse: Codec;\n/** Versioned envelope for [`HostFeatureSupportedError`]. */\nexport type VersionedHostFeatureSupportedError = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: GenericError;\n};\nexport const VersionedHostFeatureSupportedError: Codec;\n/** Versioned envelope for [`HostFeatureSupportedRequest`]. */\nexport type VersionedHostFeatureSupportedRequest = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostFeatureSupportedRequest;\n};\nexport const VersionedHostFeatureSupportedRequest: Codec;\n/** Versioned envelope for [`HostFeatureSupportedResponse`]. */\nexport type VersionedHostFeatureSupportedResponse = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostFeatureSupportedResponse;\n};\nexport const VersionedHostFeatureSupportedResponse: Codec;\n/** Versioned envelope for [`HostGetLegacyAccountsError`]. */\nexport type VersionedHostGetLegacyAccountsError = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostAccountGetError;\n};\nexport const VersionedHostGetLegacyAccountsError: Codec;\n/** Versioned envelope for [`HostGetLegacyAccountsRequest`]. */\nexport type VersionedHostGetLegacyAccountsRequest = \n/** Version 1 (no payload). */\n{\n tag: \"V1\";\n value?: undefined;\n};\nexport const VersionedHostGetLegacyAccountsRequest: Codec;\n/** Versioned envelope for [`HostGetLegacyAccountsResponse`]. */\nexport type VersionedHostGetLegacyAccountsResponse = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostGetLegacyAccountsResponse;\n};\nexport const VersionedHostGetLegacyAccountsResponse: Codec;\n/** Versioned envelope for [`HostGetProductContextError`]. */\nexport type VersionedHostGetProductContextError = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: GenericError;\n};\nexport const VersionedHostGetProductContextError: Codec;\n/** Versioned envelope for [`HostGetProductContextRequest`]. */\nexport type VersionedHostGetProductContextRequest = \n/** Version 1 (no payload). */\n{\n tag: \"V1\";\n value?: undefined;\n};\nexport const VersionedHostGetProductContextRequest: Codec;\n/** Versioned envelope for [`HostGetProductContextResponse`]. */\nexport type VersionedHostGetProductContextResponse = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostGetProductContextResponse;\n};\nexport const VersionedHostGetProductContextResponse: Codec;\n/** Versioned envelope for [`HostGetUserIdError`]. */\nexport type VersionedHostGetUserIdError = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostGetUserIdError;\n};\nexport const VersionedHostGetUserIdError: Codec;\n/** Versioned envelope for [`HostGetUserIdRequest`]. */\nexport type VersionedHostGetUserIdRequest = \n/** Version 1 (no payload). */\n{\n tag: \"V1\";\n value?: undefined;\n};\nexport const VersionedHostGetUserIdRequest: Codec;\n/** Versioned envelope for [`HostGetUserIdResponse`]. */\nexport type VersionedHostGetUserIdResponse = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostGetUserIdResponse;\n};\nexport const VersionedHostGetUserIdResponse: Codec;\n/** Versioned envelope for [`HostHandshakeError`]. */\nexport type VersionedHostHandshakeError = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostHandshakeError;\n};\nexport const VersionedHostHandshakeError: Codec;\n/** Versioned envelope for [`HostHandshakeRequest`]. */\nexport type VersionedHostHandshakeRequest = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostHandshakeRequest;\n};\nexport const VersionedHostHandshakeRequest: Codec;\n/** Versioned envelope for [`HostHandshakeResponse`]. */\nexport type VersionedHostHandshakeResponse = \n/** Version 1 (no payload). */\n{\n tag: \"V1\";\n value?: undefined;\n};\nexport const VersionedHostHandshakeResponse: Codec;\n/**\n * Identity and version of the host currently running the product.\n *\n * Reported by [`crate::api::System::host_info`] so a product knows which host\n * (and which build of it) is running it \u2014 for adapting to the host,\n * telemetry, and attributing behaviour to a concrete build in diagnostics and\n * bug reports.\n */\nexport interface HostInfo {\n /** Platform category the host runs on. */\n platform: HostPlatform;\n /**\n * Human-readable name of the host implementation, e.g. `\"Polkadot\n * Desktop\"`, `\"Polkadot Mobile\"`, or `\"dotli\"`. Hosts should report a\n * stable, non-empty name.\n */\n name: string;\n /**\n * Host-native version string, e.g. a semver such as `\"1.2.3\"`. Hosts\n * should report a non-empty value; the format is the host's own.\n */\n version: string;\n}\nexport const HostInfo: Codec;\n/** Versioned envelope for [`HostInfoError`]. */\nexport type VersionedHostInfoError = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: GenericError;\n};\nexport const VersionedHostInfoError: Codec;\n/** Versioned envelope for [`HostInfoRequest`]. */\nexport type VersionedHostInfoRequest = \n/** Version 1 (no payload). */\n{\n tag: \"V1\";\n value?: undefined;\n};\nexport const VersionedHostInfoRequest: Codec;\n/** Versioned envelope for [`HostInfoResponse`]. */\nexport type VersionedHostInfoResponse = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostInfo;\n};\nexport const VersionedHostInfoResponse: Codec;\n/** Versioned envelope for [`HostJamPeerTransportCloseError`]. */\nexport type VersionedHostJamPeerTransportCloseError = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostJamPeerTransportCloseError;\n};\nexport const VersionedHostJamPeerTransportCloseError: Codec;\n/** Versioned envelope for [`HostJamPeerTransportCloseRequest`]. */\nexport type VersionedHostJamPeerTransportCloseRequest = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostJamPeerTransportCloseRequest;\n};\nexport const VersionedHostJamPeerTransportCloseRequest: Codec;\n/** Versioned envelope for [`HostJamPeerTransportCloseResponse`]. */\nexport type VersionedHostJamPeerTransportCloseResponse = \n/** Version 1 (no payload). */\n{\n tag: \"V1\";\n value?: undefined;\n};\nexport const VersionedHostJamPeerTransportCloseResponse: Codec;\n/** Versioned envelope for [`HostJamPeerTransportDialError`]. */\nexport type VersionedHostJamPeerTransportDialError = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostJamPeerTransportDialError;\n};\nexport const VersionedHostJamPeerTransportDialError: Codec;\n/** Versioned envelope for [`HostJamPeerTransportDialRequest`]. */\nexport type VersionedHostJamPeerTransportDialRequest = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostJamPeerTransportDialRequest;\n};\nexport const VersionedHostJamPeerTransportDialRequest: Codec;\n/** Versioned envelope for [`HostJamPeerTransportDialResponse`]. */\nexport type VersionedHostJamPeerTransportDialResponse = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostJamPeerTransportDialResponse;\n};\nexport const VersionedHostJamPeerTransportDialResponse: Codec;\n/** Versioned envelope for [`HostJamPeerTransportEventsError`]. */\nexport type VersionedHostJamPeerTransportEventsError = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostJamPeerTransportEventsError;\n};\nexport const VersionedHostJamPeerTransportEventsError: Codec;\n/** Versioned envelope for [`HostJamPeerTransportEventsRequest`]. */\nexport type VersionedHostJamPeerTransportEventsRequest = \n/** Version 1 (no payload). */\n{\n tag: \"V1\";\n value?: undefined;\n};\nexport const VersionedHostJamPeerTransportEventsRequest: Codec;\n/** Versioned envelope for [`HostJamPeerTransportEventsResponse`]. */\nexport type VersionedHostJamPeerTransportEventsResponse = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostJamPeerTransportEventsResponse;\n};\nexport const VersionedHostJamPeerTransportEventsResponse: Codec;\n/** Versioned envelope for [`HostJamPeerTransportOpenError`]. */\nexport type VersionedHostJamPeerTransportOpenError = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostJamPeerTransportOpenError;\n};\nexport const VersionedHostJamPeerTransportOpenError: Codec;\n/** Versioned envelope for [`HostJamPeerTransportOpenRequest`]. */\nexport type VersionedHostJamPeerTransportOpenRequest = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostJamPeerTransportOpenRequest;\n};\nexport const VersionedHostJamPeerTransportOpenRequest: Codec;\n/** Versioned envelope for [`HostJamPeerTransportOpenResponse`]. */\nexport type VersionedHostJamPeerTransportOpenResponse = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostJamPeerTransportOpenResponse;\n};\nexport const VersionedHostJamPeerTransportOpenResponse: Codec;\n/** Versioned envelope for [`HostJamPeerTransportRecvError`]. */\nexport type VersionedHostJamPeerTransportRecvError = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostJamPeerTransportRecvError;\n};\nexport const VersionedHostJamPeerTransportRecvError: Codec;\n/** Versioned envelope for [`HostJamPeerTransportRecvRequest`]. */\nexport type VersionedHostJamPeerTransportRecvRequest = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostJamPeerTransportRecvRequest;\n};\nexport const VersionedHostJamPeerTransportRecvRequest: Codec;\n/** Versioned envelope for [`HostJamPeerTransportRecvResponse`]. */\nexport type VersionedHostJamPeerTransportRecvResponse = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostJamPeerTransportRecvResponse;\n};\nexport const VersionedHostJamPeerTransportRecvResponse: Codec;\n/** Versioned envelope for [`HostJamPeerTransportResetError`]. */\nexport type VersionedHostJamPeerTransportResetError = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostJamPeerTransportResetError;\n};\nexport const VersionedHostJamPeerTransportResetError: Codec;\n/** Versioned envelope for [`HostJamPeerTransportResetRequest`]. */\nexport type VersionedHostJamPeerTransportResetRequest = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostJamPeerTransportResetRequest;\n};\nexport const VersionedHostJamPeerTransportResetRequest: Codec;\n/** Versioned envelope for [`HostJamPeerTransportResetResponse`]. */\nexport type VersionedHostJamPeerTransportResetResponse = \n/** Version 1 (no payload). */\n{\n tag: \"V1\";\n value?: undefined;\n};\nexport const VersionedHostJamPeerTransportResetResponse: Codec;\n/** Versioned envelope for [`HostJamPeerTransportSendError`]. */\nexport type VersionedHostJamPeerTransportSendError = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostJamPeerTransportSendError;\n};\nexport const VersionedHostJamPeerTransportSendError: Codec;\n/** Versioned envelope for [`HostJamPeerTransportSendRequest`]. */\nexport type VersionedHostJamPeerTransportSendRequest = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostJamPeerTransportSendRequest;\n};\nexport const VersionedHostJamPeerTransportSendRequest: Codec;\n/** Versioned envelope for [`HostJamPeerTransportSendResponse`]. */\nexport type VersionedHostJamPeerTransportSendResponse = \n/** Version 1 (no payload). */\n{\n tag: \"V1\";\n value?: undefined;\n};\nexport const VersionedHostJamPeerTransportSendResponse: Codec;\n/** Versioned envelope for [`HostLocalStorageChangeItem`]. */\nexport type VersionedHostLocalStorageChangeItem = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostLocalStorageChangeItem;\n};\nexport const VersionedHostLocalStorageChangeItem: Codec;\n/** Versioned envelope for [`HostLocalStorageClearError`]. */\nexport type VersionedHostLocalStorageClearError = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: V01HostLocalStorageReadError;\n};\nexport const VersionedHostLocalStorageClearError: Codec;\n/** Versioned envelope for [`HostLocalStorageClearRequest`]. */\nexport type VersionedHostLocalStorageClearRequest = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostLocalStorageClearRequest;\n};\nexport const VersionedHostLocalStorageClearRequest: Codec;\n/** Versioned envelope for [`HostLocalStorageClearResponse`]. */\nexport type VersionedHostLocalStorageClearResponse = \n/** Version 1 (no payload). */\n{\n tag: \"V1\";\n value?: undefined;\n};\nexport const VersionedHostLocalStorageClearResponse: Codec;\n/** Versioned envelope for [`HostLocalStorageReadError`]. */\nexport type VersionedHostLocalStorageReadError = \n/** Version 2 payload. */\n{\n tag: \"V2\";\n value: HostLocalStorageReadError;\n};\nexport const VersionedHostLocalStorageReadError: Codec;\n/** Versioned envelope for [`HostLocalStorageReadRequest`]. */\nexport type VersionedHostLocalStorageReadRequest = \n/** Version 2 payload. */\n{\n tag: \"V2\";\n value: HostLocalStorageReadRequest;\n};\nexport const VersionedHostLocalStorageReadRequest: Codec;\n/** Versioned envelope for [`HostLocalStorageReadResponse`]. */\nexport type VersionedHostLocalStorageReadResponse = \n/** Version 2 payload. */\n{\n tag: \"V2\";\n value: HostLocalStorageReadResponse;\n};\nexport const VersionedHostLocalStorageReadResponse: Codec;\n/** Versioned envelope for [`HostLocalStorageSubscribeError`]. */\nexport type VersionedHostLocalStorageSubscribeError = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: GenericError;\n};\nexport const VersionedHostLocalStorageSubscribeError: Codec;\n/** Versioned envelope for [`HostLocalStorageSubscribeRequest`]. */\nexport type VersionedHostLocalStorageSubscribeRequest = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostLocalStorageSubscribeRequest;\n};\nexport const VersionedHostLocalStorageSubscribeRequest: Codec;\n/** Versioned envelope for [`HostLocalStorageWriteError`]. */\nexport type VersionedHostLocalStorageWriteError = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: V01HostLocalStorageReadError;\n};\nexport const VersionedHostLocalStorageWriteError: Codec;\n/** Versioned envelope for [`HostLocalStorageWriteRequest`]. */\nexport type VersionedHostLocalStorageWriteRequest = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostLocalStorageWriteRequest;\n};\nexport const VersionedHostLocalStorageWriteRequest: Codec;\n/** Versioned envelope for [`HostLocalStorageWriteResponse`]. */\nexport type VersionedHostLocalStorageWriteResponse = \n/** Version 1 (no payload). */\n{\n tag: \"V1\";\n value?: undefined;\n};\nexport const VersionedHostLocalStorageWriteResponse: Codec;\n/** Versioned envelope for [`HostLocaleLocalizeTimestampsError`]. */\nexport type VersionedHostLocaleLocalizeTimestampsError = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: GenericError;\n};\nexport const VersionedHostLocaleLocalizeTimestampsError: Codec;\n/** Versioned envelope for [`HostLocaleLocalizeTimestampsRequest`]. */\nexport type VersionedHostLocaleLocalizeTimestampsRequest = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostLocaleLocalizeTimestampsRequest;\n};\nexport const VersionedHostLocaleLocalizeTimestampsRequest: Codec;\n/** Versioned envelope for [`HostLocaleLocalizeTimestampsResponse`]. */\nexport type VersionedHostLocaleLocalizeTimestampsResponse = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostLocaleLocalizeTimestampsResponse;\n};\nexport const VersionedHostLocaleLocalizeTimestampsResponse: Codec;\n/** One timestamp's calendar identity and presentation in the requested context. */\nexport interface HostLocaleLocalizedTimestamp {\n /** Gregorian YYYY-MM-DD local date, independent of display language/calendar. */\n localDate: string;\n /** Localized short time, including the host language's hour-cycle convention. */\n time: string;\n /** Localized date label. */\n date: string;\n /** Localized date and time with a time-zone indication for detail views. */\n dateTime: string;\n}\nexport const HostLocaleLocalizedTimestamp: Codec;\n/** Versioned envelope for [`HostLocaleSubscribeError`]. */\nexport type VersionedHostLocaleSubscribeError = \n/** Version 2 payload. */\n{\n tag: \"V2\";\n value: GenericError;\n};\nexport const VersionedHostLocaleSubscribeError: Codec;\n/** Versioned envelope for [`HostLocaleSubscribeItem`]. */\nexport type VersionedHostLocaleSubscribeItem = \n/** Version 2 payload. */\n{\n tag: \"V2\";\n value: HostLocaleSubscribeItem;\n};\nexport const VersionedHostLocaleSubscribeItem: Codec;\n/** Versioned envelope for [`HostLocaleSubscribeRequest`]. */\nexport type VersionedHostLocaleSubscribeRequest = \n/** Version 2 (no payload). */\n{\n tag: \"V2\";\n value?: undefined;\n};\nexport const VersionedHostLocaleSubscribeRequest: Codec;\n/** Versioned envelope for [`HostNavigateToError`]. */\nexport type VersionedHostNavigateToError = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostNavigateToError;\n};\nexport const VersionedHostNavigateToError: Codec;\n/** Versioned envelope for [`HostNavigateToRequest`]. */\nexport type VersionedHostNavigateToRequest = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostNavigateToRequest;\n};\nexport const VersionedHostNavigateToRequest: Codec;\n/** Versioned envelope for [`HostNavigateToResponse`]. */\nexport type VersionedHostNavigateToResponse = \n/** Version 1 (no payload). */\n{\n tag: \"V1\";\n value?: undefined;\n};\nexport const VersionedHostNavigateToResponse: Codec;\n/** Versioned envelope for [`HostPaymentBalanceSubscribeError`]. */\nexport type VersionedHostPaymentBalanceSubscribeError = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostPaymentBalanceSubscribeError;\n};\nexport const VersionedHostPaymentBalanceSubscribeError: Codec;\n/** Versioned envelope for [`HostPaymentBalanceSubscribeItem`]. */\nexport type VersionedHostPaymentBalanceSubscribeItem = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostPaymentBalanceSubscribeItem;\n};\nexport const VersionedHostPaymentBalanceSubscribeItem: Codec;\n/** Versioned envelope for [`HostPaymentBalanceSubscribeRequest`]. */\nexport type VersionedHostPaymentBalanceSubscribeRequest = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostPaymentBalanceSubscribeRequest;\n};\nexport const VersionedHostPaymentBalanceSubscribeRequest: Codec;\n/** Versioned envelope for [`HostPaymentError`]. */\nexport type VersionedHostPaymentError = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostPaymentError;\n};\nexport const VersionedHostPaymentError: Codec;\n/** Versioned envelope for [`HostPaymentRequest`]. */\nexport type VersionedHostPaymentRequest = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostPaymentRequest;\n};\nexport const VersionedHostPaymentRequest: Codec;\n/** Versioned envelope for [`HostPaymentResponse`]. */\nexport type VersionedHostPaymentResponse = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostPaymentResponse;\n};\nexport const VersionedHostPaymentResponse: Codec;\n/** Versioned envelope for [`HostPaymentStatusSubscribeError`]. */\nexport type VersionedHostPaymentStatusSubscribeError = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostPaymentStatusSubscribeError;\n};\nexport const VersionedHostPaymentStatusSubscribeError: Codec;\n/** Versioned envelope for [`HostPaymentStatusSubscribeItem`]. */\nexport type VersionedHostPaymentStatusSubscribeItem = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostPaymentStatusSubscribeItem;\n};\nexport const VersionedHostPaymentStatusSubscribeItem: Codec;\n/** Versioned envelope for [`HostPaymentStatusSubscribeRequest`]. */\nexport type VersionedHostPaymentStatusSubscribeRequest = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostPaymentStatusSubscribeRequest;\n};\nexport const VersionedHostPaymentStatusSubscribeRequest: Codec;\n/** Versioned envelope for [`HostPaymentTopUpError`]. */\nexport type VersionedHostPaymentTopUpError = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostPaymentTopUpError;\n};\nexport const VersionedHostPaymentTopUpError: Codec;\n/** Versioned envelope for [`HostPaymentTopUpRequest`]. */\nexport type VersionedHostPaymentTopUpRequest = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostPaymentTopUpRequest;\n};\nexport const VersionedHostPaymentTopUpRequest: Codec;\n/** Versioned envelope for [`HostPaymentTopUpResponse`]. */\nexport type VersionedHostPaymentTopUpResponse = \n/** Version 1 (no payload). */\n{\n tag: \"V1\";\n value?: undefined;\n};\nexport const VersionedHostPaymentTopUpResponse: Codec;\n/** Platform category a host runs on. */\nexport type HostPlatform = \"Web\" | \"Android\" | \"Ios\" | \"Desktop\" | \"Cli\" | \"Unknown\";\nexport const HostPlatform: Codec;\n/** Versioned envelope for [`HostPocketListSubscribeError`]. */\nexport type VersionedHostPocketListSubscribeError = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: GenericError;\n};\nexport const VersionedHostPocketListSubscribeError: Codec;\n/** Versioned envelope for [`HostPocketListSubscribeItem`]. */\nexport type VersionedHostPocketListSubscribeItem = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostPocketListSubscribeItem;\n};\nexport const VersionedHostPocketListSubscribeItem: Codec;\n/** Versioned envelope for [`HostPocketListSubscribeRequest`]. */\nexport type VersionedHostPocketListSubscribeRequest = \n/** Version 1 (no payload). */\n{\n tag: \"V1\";\n value?: undefined;\n};\nexport const VersionedHostPocketListSubscribeRequest: Codec;\n/** Versioned envelope for [`HostPocketRemoveCardError`]. */\nexport type VersionedHostPocketRemoveCardError = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostPocketRemoveCardError;\n};\nexport const VersionedHostPocketRemoveCardError: Codec;\n/** Versioned envelope for [`HostPocketRemoveCardRequest`]. */\nexport type VersionedHostPocketRemoveCardRequest = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostPocketRemoveCardRequest;\n};\nexport const VersionedHostPocketRemoveCardRequest: Codec;\n/** Versioned envelope for [`HostPocketRemoveCardResponse`]. */\nexport type VersionedHostPocketRemoveCardResponse = \n/** Version 1 (no payload). */\n{\n tag: \"V1\";\n value?: undefined;\n};\nexport const VersionedHostPocketRemoveCardResponse: Codec;\n/** Versioned envelope for [`HostPushNotificationCancelError`]. */\nexport type VersionedHostPushNotificationCancelError = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: GenericError;\n};\nexport const VersionedHostPushNotificationCancelError: Codec;\n/** Versioned envelope for [`HostPushNotificationCancelRequest`]. */\nexport type VersionedHostPushNotificationCancelRequest = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostPushNotificationCancelRequest;\n};\nexport const VersionedHostPushNotificationCancelRequest: Codec;\n/** Versioned envelope for [`HostPushNotificationCancelResponse`]. */\nexport type VersionedHostPushNotificationCancelResponse = \n/** Version 1 (no payload). */\n{\n tag: \"V1\";\n value?: undefined;\n};\nexport const VersionedHostPushNotificationCancelResponse: Codec;\n/** Versioned envelope for [`HostPushNotificationError`]. */\nexport type VersionedHostPushNotificationError = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostPushNotificationError;\n};\nexport const VersionedHostPushNotificationError: Codec;\n/** Versioned envelope for [`HostPushNotificationRequest`]. */\nexport type VersionedHostPushNotificationRequest = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostPushNotificationRequest;\n};\nexport const VersionedHostPushNotificationRequest: Codec;\n/** Versioned envelope for [`HostPushNotificationResponse`]. */\nexport type VersionedHostPushNotificationResponse = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostPushNotificationResponse;\n};\nexport const VersionedHostPushNotificationResponse: Codec;\n/** Versioned envelope for [`HostRendererActionSubscribeError`]. */\nexport type VersionedHostRendererActionSubscribeError = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: GenericError;\n};\nexport const VersionedHostRendererActionSubscribeError: Codec;\n/** Versioned envelope for [`HostRendererActionSubscribeItem`]. */\nexport type VersionedHostRendererActionSubscribeItem = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostRendererActionSubscribeItem;\n};\nexport const VersionedHostRendererActionSubscribeItem: Codec;\n/** Versioned envelope for [`HostRendererActionSubscribeRequest`]. */\nexport type VersionedHostRendererActionSubscribeRequest = \n/** Version 1 (no payload). */\n{\n tag: \"V1\";\n value?: undefined;\n};\nexport const VersionedHostRendererActionSubscribeRequest: Codec;\n/** Versioned envelope for [`HostRequestLoginError`]. */\nexport type VersionedHostRequestLoginError = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostRequestLoginError;\n};\nexport const VersionedHostRequestLoginError: Codec;\n/** Versioned envelope for [`HostRequestLoginRequest`]. */\nexport type VersionedHostRequestLoginRequest = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostRequestLoginRequest;\n};\nexport const VersionedHostRequestLoginRequest: Codec;\n/** Versioned envelope for [`HostRequestLoginResponse`]. */\nexport type VersionedHostRequestLoginResponse = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostRequestLoginResponse;\n};\nexport const VersionedHostRequestLoginResponse: Codec;\n/** Versioned envelope for [`HostRequestResourceAllocationError`]. */\nexport type VersionedHostRequestResourceAllocationError = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: ResourceAllocationError;\n};\nexport const VersionedHostRequestResourceAllocationError: Codec;\n/** Versioned envelope for [`HostRequestResourceAllocationRequest`]. */\nexport type VersionedHostRequestResourceAllocationRequest = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostRequestResourceAllocationRequest;\n};\nexport const VersionedHostRequestResourceAllocationRequest: Codec;\n/** Versioned envelope for [`HostRequestResourceAllocationResponse`]. */\nexport type VersionedHostRequestResourceAllocationResponse = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostRequestResourceAllocationResponse;\n};\nexport const VersionedHostRequestResourceAllocationResponse: Codec;\n/**\n * Full Substrate extrinsic signing payload with all fields needed for signature\n * generation.\n */\nexport interface HostSignPayloadData {\n /** Reference block hash. */\n blockHash: HexString;\n /** Reference block number. */\n blockNumber: HexString;\n /** Mortality era encoding. */\n era: HexString;\n /** Chain genesis hash. */\n genesisHash: HexString;\n /** SCALE-encoded call data. */\n method: HexString;\n /** Account nonce. */\n nonce: HexString;\n /** Runtime spec version. */\n specVersion: HexString;\n /** Transaction tip. */\n tip: HexString;\n /** Transaction format version. */\n transactionVersion: HexString;\n /** Extension identifiers. */\n signedExtensions: Array;\n /** Extrinsic version. */\n version: number;\n /** For multi-asset tips. */\n assetId?: HexString;\n /** CheckMetadataHash extension. */\n metadataHash?: HexString;\n /** Metadata mode. */\n mode?: number;\n /** Request signed transaction back, encoded as one byte: absent, true, or false. */\n withSignedTransaction?: boolean;\n}\nexport const HostSignPayloadData: Codec;\n/** Versioned envelope for [`HostSignPayloadError`]. */\nexport type VersionedHostSignPayloadError = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostSignPayloadError;\n};\nexport const VersionedHostSignPayloadError: Codec;\n/** Versioned envelope for [`HostSignPayloadRequest`]. */\nexport type VersionedHostSignPayloadRequest = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostSignPayloadRequest;\n};\nexport const VersionedHostSignPayloadRequest: Codec;\n/** Versioned envelope for [`HostSignPayloadResponse`]. */\nexport type VersionedHostSignPayloadResponse = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostSignPayloadResponse;\n};\nexport const VersionedHostSignPayloadResponse: Codec;\n/** Versioned envelope for [`HostSignPayloadWithLegacyAccountError`]. */\nexport type VersionedHostSignPayloadWithLegacyAccountError = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostSignPayloadError;\n};\nexport const VersionedHostSignPayloadWithLegacyAccountError: Codec;\n/** Versioned envelope for [`HostSignPayloadWithLegacyAccountRequest`]. */\nexport type VersionedHostSignPayloadWithLegacyAccountRequest = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostSignPayloadWithLegacyAccountRequest;\n};\nexport const VersionedHostSignPayloadWithLegacyAccountRequest: Codec;\n/** Versioned envelope for [`HostSignPayloadWithLegacyAccountResponse`]. */\nexport type VersionedHostSignPayloadWithLegacyAccountResponse = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostSignPayloadResponse;\n};\nexport const VersionedHostSignPayloadWithLegacyAccountResponse: Codec;\n/** Versioned envelope for [`HostSignRawError`]. */\nexport type VersionedHostSignRawError = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostSignPayloadError;\n};\nexport const VersionedHostSignRawError: Codec;\n/** Versioned envelope for [`HostSignRawRequest`]. */\nexport type VersionedHostSignRawRequest = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostSignRawRequest;\n};\nexport const VersionedHostSignRawRequest: Codec;\n/** Versioned envelope for [`HostSignRawResponse`]. */\nexport type VersionedHostSignRawResponse = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostSignPayloadResponse;\n};\nexport const VersionedHostSignRawResponse: Codec;\n/** Versioned envelope for [`HostSignRawWithLegacyAccountError`]. */\nexport type VersionedHostSignRawWithLegacyAccountError = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostSignPayloadError;\n};\nexport const VersionedHostSignRawWithLegacyAccountError: Codec;\n/** Versioned envelope for [`HostSignRawWithLegacyAccountRequest`]. */\nexport type VersionedHostSignRawWithLegacyAccountRequest = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostSignRawWithLegacyAccountRequest;\n};\nexport const VersionedHostSignRawWithLegacyAccountRequest: Codec;\n/** Versioned envelope for [`HostSignRawWithLegacyAccountResponse`]. */\nexport type VersionedHostSignRawWithLegacyAccountResponse = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostSignPayloadResponse;\n};\nexport const VersionedHostSignRawWithLegacyAccountResponse: Codec;\n/** Versioned envelope for [`HostThemeSubscribeError`]. */\nexport type VersionedHostThemeSubscribeError = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: GenericError;\n};\nexport const VersionedHostThemeSubscribeError: Codec;\n/** Versioned envelope for [`HostThemeSubscribeItem`]. */\nexport type VersionedHostThemeSubscribeItem = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostThemeSubscribeItem;\n};\nexport const VersionedHostThemeSubscribeItem: Codec;\n/** Versioned envelope for [`HostThemeSubscribeRequest`]. */\nexport type VersionedHostThemeSubscribeRequest = \n/** Version 1 (no payload). */\n{\n tag: \"V1\";\n value?: undefined;\n};\nexport const VersionedHostThemeSubscribeRequest: Codec;\n/** Versioned envelope for [`HostWorkerBeginOperationError`]. */\nexport type VersionedHostWorkerBeginOperationError = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostWorkerOperationError;\n};\nexport const VersionedHostWorkerBeginOperationError: Codec;\n/** Versioned envelope for [`HostWorkerBeginOperationRequest`]. */\nexport type VersionedHostWorkerBeginOperationRequest = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostWorkerBeginOperationRequest;\n};\nexport const VersionedHostWorkerBeginOperationRequest: Codec;\n/** Versioned envelope for [`HostWorkerBeginOperationResponse`]. */\nexport type VersionedHostWorkerBeginOperationResponse = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostWorkerBeginOperationResponse;\n};\nexport const VersionedHostWorkerBeginOperationResponse: Codec;\n/** Versioned envelope for [`HostWorkerEndOperationError`]. */\nexport type VersionedHostWorkerEndOperationError = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostWorkerOperationError;\n};\nexport const VersionedHostWorkerEndOperationError: Codec;\n/** Versioned envelope for [`HostWorkerEndOperationRequest`]. */\nexport type VersionedHostWorkerEndOperationRequest = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HostWorkerEndOperationRequest;\n};\nexport const VersionedHostWorkerEndOperationRequest: Codec;\n/** Versioned envelope for [`HostWorkerEndOperationResponse`]. */\nexport type VersionedHostWorkerEndOperationResponse = \n/** Version 1 (no payload). */\n{\n tag: \"V1\";\n value?: undefined;\n};\nexport const VersionedHostWorkerEndOperationResponse: Codec;\n/** Pending-operation error. */\nexport type HostWorkerOperationError = \n/**\n * The product is already at the host's per-product limit of open\n * operations.\n */\n{\n tag: \"TooManyOpen\";\n value?: undefined;\n}\n/** Catch-all host failure. */\n | {\n tag: \"Unknown\";\n value: {\n reason: string;\n };\n};\nexport const HostWorkerOperationError: Codec;\n/** How an image meets the box its modifiers size. */\nexport type ImageFit = \"None\" | \"Fill\" | \"Cover\" | \"Contain\" | \"ScaleDown\";\nexport const ImageFit: Codec;\n/** Properties of an `Image`. */\nexport interface ImageProps {\n /** Where the image bytes come from. */\n source: ImageSource;\n /** Defaults to `Fill`. */\n fit?: ImageFit;\n}\nexport const ImageProps: Codec;\n/** Where image bytes come from. The host fetches them; the tree carries no URL. */\nexport type ImageSource = \n/** A Bulletin chain blob, addressed by its CID. */\n{\n tag: \"Bulletin\";\n value: string;\n}\n/**\n * A file inside the product's executable archive, as a path relative to\n * the archive root.\n */\n | {\n tag: \"Archive\";\n value: string;\n};\nexport const ImageSource: Codec;\n/** Asynchronous transport notification. */\nexport type JamPeerTransportEvent = \n/** The connection was closed by the peer or the host. */\n{\n tag: \"ConnClosed\";\n value: {\n conn: number;\n };\n}\n/** The peer finished its send side of a stream. */\n | {\n tag: \"StreamFin\";\n value: {\n stream: number;\n };\n}\n/** The peer opened a stream to us on a dialed connection. */\n | {\n tag: \"Accepted\";\n value: {\n conn: number;\n stream: number;\n kind: number;\n };\n};\nexport const JamPeerTransportEvent: Codec;\n/**\n * A user-imported (legacy) account: public key plus an optional user-chosen\n * display name.\n *\n * Returned by [`HostGetLegacyAccountsResponse`]. Distinct from\n * [`ProductAccount`], which is protocol-derived and never carries a label.\n */\nexport interface LegacyAccount {\n /** The account public key (variable-length bytes). */\n publicKey: HexString;\n /** Optional user-chosen display name. */\n name?: string;\n}\nexport const LegacyAccount: Codec;\n/**\n * Transaction payload for a legacy (non-product) account.\n *\n * Identical to [`ProductAccountTxPayload`] except the signer is a raw\n * 32-byte account identifier.\n */\nexport interface LegacyAccountTxPayload {\n /** Raw 32-byte public key of the legacy account. */\n signer: HexString;\n /** Chain where the transaction will execute. */\n genesisHash: HexString;\n /** SCALE-encoded Call data. */\n callData: HexString;\n /** Transaction extensions supplied by the caller. */\n extensions: Array;\n /**\n * Version of the transaction extensions in `extensions`, as the runtime\n * numbers them.\n */\n txExtVersion: number;\n}\nexport const LegacyAccountTxPayload: Codec;\n/** Layout and styling applied to one node. */\nexport type Modifier = \n/** Outer spacing. */\n{\n tag: \"Margin\";\n value: Dimensions;\n}\n/** Inner spacing. */\n | {\n tag: \"Padding\";\n value: Dimensions;\n}\n/** Background fill. */\n | {\n tag: \"Background\";\n value: Background;\n}\n/** Border. */\n | {\n tag: \"Border\";\n value: BorderStyle;\n}\n/** Fixed height. */\n | {\n tag: \"Height\";\n value: Size;\n}\n/** Fixed width. */\n | {\n tag: \"Width\";\n value: Size;\n}\n/** Minimum width. */\n | {\n tag: \"MinWidth\";\n value: Size;\n}\n/** Minimum height. */\n | {\n tag: \"MinHeight\";\n value: Size;\n}\n/** Fill the available width. */\n | {\n tag: \"FillWidth\";\n value: boolean;\n}\n/** Fill the available height. */\n | {\n tag: \"FillHeight\";\n value: boolean;\n}\n/** 0 is transparent, 255 is opaque. */\n | {\n tag: \"Opacity\";\n value: number;\n}\n/** Compositing mode against what is behind the node. */\n | {\n tag: \"BlendingMode\";\n value: BlendingMode;\n};\nexport const Modifier: Codec;\n/** Outcome of starting a chain-head operation. */\nexport type OperationStartedResult = \n/** The operation was accepted; results arrive as follow events. */\n{\n tag: \"Started\";\n value: {\n operationId: string;\n };\n}\n/** Too many operations are in progress; retry after some complete. */\n | {\n tag: \"LimitReached\";\n value?: undefined;\n};\nexport const OperationStartedResult: Codec;\n/**\n * Source for a payment top-up operation.\n *\n * See [RFC 0006].\n *\n * [RFC 0006]: https://github.com/paritytech/triangle-js-sdks/pull/94\n */\nexport type PaymentTopUpSource = \n/** Fund from one of the calling product's scoped accounts. */\n{\n tag: \"ProductAccount\";\n value: {\n derivationIndex: DerivationIndex;\n };\n}\n/**\n * Fund from a one-time account represented by its private key. This is a\n * standard account holding public funds, not a coin key.\n */\n | {\n tag: \"PrivateKey\";\n value: {\n sr25519SecretKey: HexString;\n };\n}\n/**\n * Fund directly from coin secret keys. Each key is an sr25519 secret\n * controlling a single coin.\n */\n | {\n tag: \"Coins\";\n value: {\n sr25519SecretKeys: Array;\n };\n};\nexport const PaymentTopUpSource: Codec;\n/** One of the calling product's Pocket cards. */\nexport interface PocketCard {\n /** Card label declared by the product, unique within the product. */\n cardId: string;\n /** Placed by the host itself; removable by neither the user nor the product. */\n privileged: boolean;\n}\nexport const PocketCard: Codec;\n/** Preimage submission error. */\nexport type PreimageSubmitError = \n/** Catch-all. */\n{\n tag: \"Unknown\";\n value: {\n reason: string;\n };\n};\nexport const PreimageSubmitError: Codec;\n/** A product account: public key only, no display name. */\nexport interface ProductAccount {\n /** The account public key (variable-length bytes). */\n publicKey: HexString;\n}\nexport const ProductAccount: Codec;\n/**\n * Identifies a product-specific account by combining a dotNS domain name with a\n * derivation index.\n */\nexport interface ProductAccountId {\n /** A dotNS domain name identifier (e.g., `\"my-product.dot\"`). */\n dotNsIdentifier: string;\n /** Account selector within the product subtree. */\n derivationIndex: DerivationIndex;\n}\nexport const ProductAccountId: Codec;\n/**\n * Transaction payload for a product account.\n *\n * Contains everything the host needs to construct a signed extrinsic.\n * The signer is a [`ProductAccountId`]; the host resolves the\n * corresponding key pair through its account management layer.\n */\nexport interface ProductAccountTxPayload {\n /** Product account that will sign the transaction. */\n signer: ProductAccountId;\n /** Chain where the transaction will execute. */\n genesisHash: HexString;\n /** SCALE-encoded Call data. */\n callData: HexString;\n /** Transaction extensions supplied by the caller. */\n extensions: Array;\n /**\n * Version of the transaction extensions in `extensions`, as the runtime\n * numbers them.\n */\n txExtVersion: number;\n /**\n * Contact handles `call_data` names, which the host replaces with the\n * accounts they resolve to before anything is signed or shown.\n *\n * A product declares them rather than passing offsets: an offset is a\n * number it computes about its own encoding and gets wrong silently,\n * while a declared handle is either in the call or it is not, and a host\n * that cannot find one refuses rather than signing a call that names\n * somebody else. A call naming nobody leaves this empty.\n */\n contacts: Array;\n}\nexport const ProductAccountTxPayload: Codec;\n/**\n * A product-scoped proof context: a product and a context within it.\n *\n * Hashed (with a `product//` prefix) into the 32-byte context bound\n * to a ring VRF proof, so contexts cannot collide across products and the same\n * member key under different contexts yields unlinkable aliases.\n */\nexport interface ProductProofContext {\n /** dotNS product identifier (e.g. `\"my-product.dot\"`) scoping the context. */\n productId: string;\n /**\n * Selector distinguishing contexts within the product; expands to the\n * same 32-byte derivation index as [`ProductAccountId::derivation_index`].\n */\n suffix: DerivationIndex;\n}\nexport const ProductProofContext: Codec;\n/** Versioned envelope for [`ProductRendererRenderError`]. */\nexport type VersionedProductRendererRenderError = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: GenericError;\n};\nexport const VersionedProductRendererRenderError: Codec;\n/** Versioned envelope for [`ProductRendererRenderItem`]. */\nexport type VersionedProductRendererRenderItem = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: RendererNode;\n};\nexport const VersionedProductRendererRenderItem: Codec;\n/** Versioned envelope for [`ProductRendererRenderRequest`]. */\nexport type VersionedProductRendererRenderRequest = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: ProductRendererRenderRequest;\n};\nexport const VersionedProductRendererRenderRequest: Codec;\n/** Raw data to sign -- either binary bytes or a string message. */\nexport type RawPayload = \n/** Raw binary data to sign. */\n{\n tag: \"Bytes\";\n value: {\n bytes: HexString;\n };\n}\n/** String message to sign. */\n | {\n tag: \"Payload\";\n value: {\n payload: string;\n };\n};\nexport const RawPayload: Codec;\n/** A registered ring-VRF key entry. */\nexport interface RegisteredRingVrfKey {\n /** Stable public name of the key. */\n handle: ProductAccountId;\n /** Rings the owning product declared this key for. */\n rings: Array;\n /** Present when the caller owns the key or requested/granted disclosure. */\n publicKey?: HexString;\n}\nexport const RegisteredRingVrfKey: Codec;\n/** Versioned envelope for [`RemoteChainHeadBodyError`]. */\nexport type VersionedRemoteChainHeadBodyError = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: GenericError;\n};\nexport const VersionedRemoteChainHeadBodyError: Codec;\n/** Versioned envelope for [`RemoteChainHeadBodyRequest`]. */\nexport type VersionedRemoteChainHeadBodyRequest = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: RemoteChainHeadBodyRequest;\n};\nexport const VersionedRemoteChainHeadBodyRequest: Codec;\n/** Versioned envelope for [`RemoteChainHeadBodyResponse`]. */\nexport type VersionedRemoteChainHeadBodyResponse = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: RemoteChainHeadBodyResponse;\n};\nexport const VersionedRemoteChainHeadBodyResponse: Codec;\n/** Versioned envelope for [`RemoteChainHeadCallError`]. */\nexport type VersionedRemoteChainHeadCallError = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: GenericError;\n};\nexport const VersionedRemoteChainHeadCallError: Codec;\n/** Versioned envelope for [`RemoteChainHeadCallRequest`]. */\nexport type VersionedRemoteChainHeadCallRequest = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: RemoteChainHeadCallRequest;\n};\nexport const VersionedRemoteChainHeadCallRequest: Codec;\n/** Versioned envelope for [`RemoteChainHeadCallResponse`]. */\nexport type VersionedRemoteChainHeadCallResponse = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: RemoteChainHeadCallResponse;\n};\nexport const VersionedRemoteChainHeadCallResponse: Codec;\n/** Versioned envelope for [`RemoteChainHeadContinueError`]. */\nexport type VersionedRemoteChainHeadContinueError = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: GenericError;\n};\nexport const VersionedRemoteChainHeadContinueError: Codec;\n/** Versioned envelope for [`RemoteChainHeadContinueRequest`]. */\nexport type VersionedRemoteChainHeadContinueRequest = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: RemoteChainHeadContinueRequest;\n};\nexport const VersionedRemoteChainHeadContinueRequest: Codec;\n/** Versioned envelope for [`RemoteChainHeadContinueResponse`]. */\nexport type VersionedRemoteChainHeadContinueResponse = \n/** Version 1 (no payload). */\n{\n tag: \"V1\";\n value?: undefined;\n};\nexport const VersionedRemoteChainHeadContinueResponse: Codec;\n/** Versioned envelope for [`RemoteChainHeadFollowError`]. */\nexport type VersionedRemoteChainHeadFollowError = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: GenericError;\n};\nexport const VersionedRemoteChainHeadFollowError: Codec;\n/** Versioned envelope for [`RemoteChainHeadFollowItem`]. */\nexport type VersionedRemoteChainHeadFollowItem = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: RemoteChainHeadFollowItem;\n};\nexport const VersionedRemoteChainHeadFollowItem: Codec;\n/** Versioned envelope for [`RemoteChainHeadFollowRequest`]. */\nexport type VersionedRemoteChainHeadFollowRequest = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: RemoteChainHeadFollowRequest;\n};\nexport const VersionedRemoteChainHeadFollowRequest: Codec;\n/** Versioned envelope for [`RemoteChainHeadHeaderError`]. */\nexport type VersionedRemoteChainHeadHeaderError = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: GenericError;\n};\nexport const VersionedRemoteChainHeadHeaderError: Codec;\n/** Versioned envelope for [`RemoteChainHeadHeaderRequest`]. */\nexport type VersionedRemoteChainHeadHeaderRequest = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: RemoteChainHeadHeaderRequest;\n};\nexport const VersionedRemoteChainHeadHeaderRequest: Codec;\n/** Versioned envelope for [`RemoteChainHeadHeaderResponse`]. */\nexport type VersionedRemoteChainHeadHeaderResponse = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: RemoteChainHeadHeaderResponse;\n};\nexport const VersionedRemoteChainHeadHeaderResponse: Codec;\n/** Versioned envelope for [`RemoteChainHeadStopOperationError`]. */\nexport type VersionedRemoteChainHeadStopOperationError = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: GenericError;\n};\nexport const VersionedRemoteChainHeadStopOperationError: Codec;\n/** Versioned envelope for [`RemoteChainHeadStopOperationRequest`]. */\nexport type VersionedRemoteChainHeadStopOperationRequest = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: RemoteChainHeadStopOperationRequest;\n};\nexport const VersionedRemoteChainHeadStopOperationRequest: Codec;\n/** Versioned envelope for [`RemoteChainHeadStopOperationResponse`]. */\nexport type VersionedRemoteChainHeadStopOperationResponse = \n/** Version 1 (no payload). */\n{\n tag: \"V1\";\n value?: undefined;\n};\nexport const VersionedRemoteChainHeadStopOperationResponse: Codec;\n/** Versioned envelope for [`RemoteChainHeadStorageError`]. */\nexport type VersionedRemoteChainHeadStorageError = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: GenericError;\n};\nexport const VersionedRemoteChainHeadStorageError: Codec;\n/** Versioned envelope for [`RemoteChainHeadStorageRequest`]. */\nexport type VersionedRemoteChainHeadStorageRequest = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: RemoteChainHeadStorageRequest;\n};\nexport const VersionedRemoteChainHeadStorageRequest: Codec;\n/** Versioned envelope for [`RemoteChainHeadStorageResponse`]. */\nexport type VersionedRemoteChainHeadStorageResponse = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: RemoteChainHeadStorageResponse;\n};\nexport const VersionedRemoteChainHeadStorageResponse: Codec;\n/** Versioned envelope for [`RemoteChainHeadUnpinError`]. */\nexport type VersionedRemoteChainHeadUnpinError = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: GenericError;\n};\nexport const VersionedRemoteChainHeadUnpinError: Codec;\n/** Versioned envelope for [`RemoteChainHeadUnpinRequest`]. */\nexport type VersionedRemoteChainHeadUnpinRequest = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: RemoteChainHeadUnpinRequest;\n};\nexport const VersionedRemoteChainHeadUnpinRequest: Codec;\n/** Versioned envelope for [`RemoteChainHeadUnpinResponse`]. */\nexport type VersionedRemoteChainHeadUnpinResponse = \n/** Version 1 (no payload). */\n{\n tag: \"V1\";\n value?: undefined;\n};\nexport const VersionedRemoteChainHeadUnpinResponse: Codec;\n/** Versioned envelope for [`RemoteChainInfoError`]. */\nexport type VersionedRemoteChainInfoError = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: RemoteChainInfoError;\n};\nexport const VersionedRemoteChainInfoError: Codec;\n/** Versioned envelope for [`RemoteChainInfoRequest`]. */\nexport type VersionedRemoteChainInfoRequest = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: RemoteChainInfoRequest;\n};\nexport const VersionedRemoteChainInfoRequest: Codec;\n/** Versioned envelope for [`RemoteChainInfoResponse`]. */\nexport type VersionedRemoteChainInfoResponse = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: RemoteChainInfoResponse;\n};\nexport const VersionedRemoteChainInfoResponse: Codec;\n/** Versioned envelope for [`RemoteChainSpecChainNameError`]. */\nexport type VersionedRemoteChainSpecChainNameError = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: GenericError;\n};\nexport const VersionedRemoteChainSpecChainNameError: Codec;\n/** Versioned envelope for [`RemoteChainSpecChainNameRequest`]. */\nexport type VersionedRemoteChainSpecChainNameRequest = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: RemoteChainSpecChainNameRequest;\n};\nexport const VersionedRemoteChainSpecChainNameRequest: Codec;\n/** Versioned envelope for [`RemoteChainSpecChainNameResponse`]. */\nexport type VersionedRemoteChainSpecChainNameResponse = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: RemoteChainSpecChainNameResponse;\n};\nexport const VersionedRemoteChainSpecChainNameResponse: Codec;\n/** Versioned envelope for [`RemoteChainSpecGenesisHashError`]. */\nexport type VersionedRemoteChainSpecGenesisHashError = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: GenericError;\n};\nexport const VersionedRemoteChainSpecGenesisHashError: Codec;\n/** Versioned envelope for [`RemoteChainSpecGenesisHashRequest`]. */\nexport type VersionedRemoteChainSpecGenesisHashRequest = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: RemoteChainSpecGenesisHashRequest;\n};\nexport const VersionedRemoteChainSpecGenesisHashRequest: Codec;\n/** Versioned envelope for [`RemoteChainSpecGenesisHashResponse`]. */\nexport type VersionedRemoteChainSpecGenesisHashResponse = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: RemoteChainSpecGenesisHashResponse;\n};\nexport const VersionedRemoteChainSpecGenesisHashResponse: Codec;\n/** Versioned envelope for [`RemoteChainSpecPropertiesError`]. */\nexport type VersionedRemoteChainSpecPropertiesError = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: GenericError;\n};\nexport const VersionedRemoteChainSpecPropertiesError: Codec;\n/** Versioned envelope for [`RemoteChainSpecPropertiesRequest`]. */\nexport type VersionedRemoteChainSpecPropertiesRequest = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: RemoteChainSpecPropertiesRequest;\n};\nexport const VersionedRemoteChainSpecPropertiesRequest: Codec;\n/** Versioned envelope for [`RemoteChainSpecPropertiesResponse`]. */\nexport type VersionedRemoteChainSpecPropertiesResponse = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: RemoteChainSpecPropertiesResponse;\n};\nexport const VersionedRemoteChainSpecPropertiesResponse: Codec;\n/** Versioned envelope for [`RemoteChainTransactionBroadcastError`]. */\nexport type VersionedRemoteChainTransactionBroadcastError = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: GenericError;\n};\nexport const VersionedRemoteChainTransactionBroadcastError: Codec;\n/** Versioned envelope for [`RemoteChainTransactionBroadcastRequest`]. */\nexport type VersionedRemoteChainTransactionBroadcastRequest = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: RemoteChainTransactionBroadcastRequest;\n};\nexport const VersionedRemoteChainTransactionBroadcastRequest: Codec;\n/** Versioned envelope for [`RemoteChainTransactionBroadcastResponse`]. */\nexport type VersionedRemoteChainTransactionBroadcastResponse = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: RemoteChainTransactionBroadcastResponse;\n};\nexport const VersionedRemoteChainTransactionBroadcastResponse: Codec;\n/** Versioned envelope for [`RemoteChainTransactionStopError`]. */\nexport type VersionedRemoteChainTransactionStopError = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: GenericError;\n};\nexport const VersionedRemoteChainTransactionStopError: Codec;\n/** Versioned envelope for [`RemoteChainTransactionStopRequest`]. */\nexport type VersionedRemoteChainTransactionStopRequest = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: RemoteChainTransactionStopRequest;\n};\nexport const VersionedRemoteChainTransactionStopRequest: Codec;\n/** Versioned envelope for [`RemoteChainTransactionStopResponse`]. */\nexport type VersionedRemoteChainTransactionStopResponse = \n/** Version 1 (no payload). */\n{\n tag: \"V1\";\n value?: undefined;\n};\nexport const VersionedRemoteChainTransactionStopResponse: Codec;\n/**\n * One remote-operation permission requested by the product (RFC 0002).\n *\n * `ChainSubmit`, `PreimageSubmit`, `StatementSubmit` and `JamPeers` are also\n * triggered implicitly by the corresponding business calls when not yet\n * granted (`JamPeerTransport::dial` for `JamPeers`).\n */\nexport type RemotePermission = \n/**\n * Outbound HTTP/WebSocket access to a set of domains. External navigation\n * uses [`HostDevicePermissionRequest::OpenUrl`] instead.\n */\n{\n tag: \"Remote\";\n value: {\n domains: Array;\n };\n}\n/**\n * WebRTC access.\n *\n * The container authorizes each peer connection through Rust before its\n * first network method. Later methods on that connection share the same\n * decision, so a one-use grant permits one connection. New connections\n * check current permissions without requiring a page reload.\n *\n * Camera and microphone capture is gated by the OS permission prompts and\n * [`HostDevicePermissionRequest`], not by this permission.\n */\n | {\n tag: \"WebRtc\";\n value?: undefined;\n}\n/** Submitting transactions on behalf of the user via `remote_chain_transaction_broadcast`. */\n | {\n tag: \"ChainSubmit\";\n value?: undefined;\n}\n/** Submitting preimages on behalf of the user via `remote_preimage_submit`. */\n | {\n tag: \"PreimageSubmit\";\n value?: undefined;\n}\n/** Submitting statements on behalf of the user via `remote_statement_store_submit`. */\n | {\n tag: \"StatementSubmit\";\n value?: undefined;\n}\n/**\n * Read-only peer access over JAMNP-S QUIC/WebTransport to the validators\n * of one JAM chain, through the `JamPeerTransport` service.\n *\n * The app names the endpoints it dials; the grant covers only peers of\n * `genesis`. Every byte received is untrusted, and the grant carries no\n * account, signing or submission authority.\n */\n | {\n tag: \"JamPeers\";\n value: {\n genesis: HexString;\n };\n};\nexport const RemotePermission: Codec;\n/** Versioned envelope for [`RemotePermissionError`]. */\nexport type VersionedRemotePermissionError = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: GenericError;\n};\nexport const VersionedRemotePermissionError: Codec;\n/** Versioned envelope for [`RemotePermissionRequest`]. */\nexport type VersionedRemotePermissionRequest = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: RemotePermissionRequest;\n};\nexport const VersionedRemotePermissionRequest: Codec;\n/** Versioned envelope for [`RemotePermissionResponse`]. */\nexport type VersionedRemotePermissionResponse = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: RemotePermissionResponse;\n};\nexport const VersionedRemotePermissionResponse: Codec;\n/** Versioned envelope for [`RemotePreimageLookupSubscribeError`]. */\nexport type VersionedRemotePreimageLookupSubscribeError = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: GenericError;\n};\nexport const VersionedRemotePreimageLookupSubscribeError: Codec;\n/** Versioned envelope for [`RemotePreimageLookupSubscribeItem`]. */\nexport type VersionedRemotePreimageLookupSubscribeItem = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: RemotePreimageLookupSubscribeItem;\n};\nexport const VersionedRemotePreimageLookupSubscribeItem: Codec;\n/** Versioned envelope for [`RemotePreimageLookupSubscribeRequest`]. */\nexport type VersionedRemotePreimageLookupSubscribeRequest = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: RemotePreimageLookupSubscribeRequest;\n};\nexport const VersionedRemotePreimageLookupSubscribeRequest: Codec;\n/** Versioned envelope for [`RemotePreimageSubmitError`]. */\nexport type VersionedRemotePreimageSubmitError = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: PreimageSubmitError;\n};\nexport const VersionedRemotePreimageSubmitError: Codec;\n/** Versioned envelope for [`RemotePreimageSubmitRequest`]. */\nexport type VersionedRemotePreimageSubmitRequest = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HexString;\n};\nexport const VersionedRemotePreimageSubmitRequest: Codec;\n/** Versioned envelope for [`RemotePreimageSubmitResponse`]. */\nexport type VersionedRemotePreimageSubmitResponse = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: HexString;\n};\nexport const VersionedRemotePreimageSubmitResponse: Codec;\n/** Versioned envelope for [`RemoteStatementStoreCreateProofAuthorizedError`]. */\nexport type VersionedRemoteStatementStoreCreateProofAuthorizedError = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: RemoteStatementStoreCreateProofError;\n};\nexport const VersionedRemoteStatementStoreCreateProofAuthorizedError: Codec;\n/** Versioned envelope for [`RemoteStatementStoreCreateProofAuthorizedRequest`]. */\nexport type VersionedRemoteStatementStoreCreateProofAuthorizedRequest = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: Statement;\n};\nexport const VersionedRemoteStatementStoreCreateProofAuthorizedRequest: Codec;\n/** Versioned envelope for [`RemoteStatementStoreCreateProofAuthorizedResponse`]. */\nexport type VersionedRemoteStatementStoreCreateProofAuthorizedResponse = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: RemoteStatementStoreCreateProofResponse;\n};\nexport const VersionedRemoteStatementStoreCreateProofAuthorizedResponse: Codec;\n/** Versioned envelope for [`RemoteStatementStoreCreateProofError`]. */\nexport type VersionedRemoteStatementStoreCreateProofError = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: RemoteStatementStoreCreateProofError;\n};\nexport const VersionedRemoteStatementStoreCreateProofError: Codec;\n/** Versioned envelope for [`RemoteStatementStoreCreateProofRequest`]. */\nexport type VersionedRemoteStatementStoreCreateProofRequest = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: RemoteStatementStoreCreateProofRequest;\n};\nexport const VersionedRemoteStatementStoreCreateProofRequest: Codec;\n/** Versioned envelope for [`RemoteStatementStoreCreateProofResponse`]. */\nexport type VersionedRemoteStatementStoreCreateProofResponse = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: RemoteStatementStoreCreateProofResponse;\n};\nexport const VersionedRemoteStatementStoreCreateProofResponse: Codec;\n/** Versioned envelope for [`RemoteStatementStoreSubmitError`]. */\nexport type VersionedRemoteStatementStoreSubmitError = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: GenericError;\n};\nexport const VersionedRemoteStatementStoreSubmitError: Codec;\n/** Versioned envelope for [`RemoteStatementStoreSubmitRequest`]. */\nexport type VersionedRemoteStatementStoreSubmitRequest = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: SignedStatement;\n};\nexport const VersionedRemoteStatementStoreSubmitRequest: Codec;\n/** Versioned envelope for [`RemoteStatementStoreSubmitResponse`]. */\nexport type VersionedRemoteStatementStoreSubmitResponse = \n/** Version 1 (no payload). */\n{\n tag: \"V1\";\n value?: undefined;\n};\nexport const VersionedRemoteStatementStoreSubmitResponse: Codec;\n/** Versioned envelope for [`RemoteStatementStoreSubscribeError`]. */\nexport type VersionedRemoteStatementStoreSubscribeError = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: GenericError;\n};\nexport const VersionedRemoteStatementStoreSubscribeError: Codec;\n/** Versioned envelope for [`RemoteStatementStoreSubscribeItem`]. */\nexport type VersionedRemoteStatementStoreSubscribeItem = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: RemoteStatementStoreSubscribeItem;\n};\nexport const VersionedRemoteStatementStoreSubscribeItem: Codec;\n/** Versioned envelope for [`RemoteStatementStoreSubscribeRequest`]. */\nexport type VersionedRemoteStatementStoreSubscribeRequest = \n/** Version 1 payload. */\n{\n tag: \"V1\";\n value: RemoteStatementStoreSubscribeRequest;\n};\nexport const VersionedRemoteStatementStoreSubscribeRequest: Codec;\n/** Where a product-rendered body lives, and the id that names it there. */\nexport type RenderContext = \n/** A message in a chat room. */\n{\n tag: \"ChatMessage\";\n value: {\n roomId: string;\n messageId: string;\n messageType: string;\n };\n}\n/** A candidate answered to an input query. */\n | {\n tag: \"InputWidget\";\n value: {\n candidateId: string;\n };\n}\n/** A card face in the host's Pocket collection. */\n | {\n tag: \"PocketCard\";\n value: {\n cardId: string;\n };\n};\nexport const RenderContext: Codec;\n/**\n * A node in a product-rendered tree. Container variants recurse through\n * `children`.\n */\nexport type RendererNode = \n/** Draws nothing. */\n{\n tag: \"Nil\";\n value?: undefined;\n}\n/** A text run. */\n | {\n tag: \"String\";\n value: {\n text: string;\n };\n}\n/** Generic container. */\n | {\n tag: \"Box\";\n value: {\n modifiers: Array;\n props: BoxProps;\n children: Array;\n };\n}\n/** Vertical layout. */\n | {\n tag: \"Column\";\n value: {\n modifiers: Array;\n props: ColumnProps;\n children: Array;\n };\n}\n/** Horizontal layout. */\n | {\n tag: \"Row\";\n value: {\n modifiers: Array;\n props: RowProps;\n children: Array;\n };\n}\n/** Flexible space. */\n | {\n tag: \"Spacer\";\n value: {\n modifiers: Array;\n };\n}\n/** Styled text. */\n | {\n tag: \"Text\";\n value: {\n modifiers: Array;\n props: TextProps;\n children: Array;\n };\n}\n/** Interactive button. */\n | {\n tag: \"Button\";\n value: {\n modifiers: Array;\n props: ButtonProps;\n children: Array;\n };\n}\n/** Single-line text input. */\n | {\n tag: \"TextField\";\n value: {\n modifiers: Array;\n props: TextFieldProps;\n };\n}\n/** Image, sized by modifiers. */\n | {\n tag: \"Image\";\n value: {\n modifiers: Array;\n props: ImageProps;\n };\n}\n/** Applies its effect to its children. */\n | {\n tag: \"Effect\";\n value: {\n props: EffectProps;\n children: Array;\n };\n};\nexport const RendererNode: Codec;\n/** Error from [`crate::api::ResourceAllocation::request`]. */\nexport type ResourceAllocationError = \n/** Catch-all. */\n{\n tag: \"Unknown\";\n value: {\n reason: string;\n };\n};\nexport const ResourceAllocationError: Codec;\n/**\n * Locates a ring for ring VRF operations using only identifiers that are\n * stable across membership changes.\n */\nexport interface RingLocation {\n /** Genesis hash of the chain hosting the ring. */\n chainId: HexString;\n /** Path addressing the ring within the chain. */\n junctions: Array;\n}\nexport const RingLocation: Codec;\n/** A single step in a [`RingLocation`] path, addressing a ring within a chain. */\nexport type RingLocationJunction = \n/** Pallet instance hosting the ring collection. */\n{\n tag: \"PalletInstance\";\n value: number;\n}\n/** Ring collection identifier within the pallet. */\n | {\n tag: \"CollectionId\";\n value: HexString;\n};\nexport const RingLocationJunction: Codec;\n/** How much of a registry entry the caller asks for. */\nexport type RingVrfKeyDisclosure = \"Anonymized\" | \"PublicKey\";\nexport const RingVrfKeyDisclosure: Codec;\n/** Properties of a `Row`. */\nexport interface RowProps {\n /** Cross-axis alignment of children. */\n verticalAlignment?: VerticalAlignment;\n /** Main-axis distribution of children. */\n horizontalArrangement?: Arrangement;\n}\nexport const RowProps: Codec;\n/** One entry of a runtime's supported API list. */\nexport interface RuntimeApi {\n /** Runtime API name. */\n name: string;\n /** Runtime API version. */\n version: number;\n}\nexport const RuntimeApi: Codec;\n/** Runtime version information for a block's runtime. */\nexport interface RuntimeSpec {\n /** Specification name. */\n specName: string;\n /** Implementation name. */\n implName: string;\n /** Spec version number. */\n specVersion: number;\n /** Implementation version. */\n implVersion: number;\n /** Transaction format version. */\n transactionVersion?: number;\n /** Supported runtime APIs. */\n apis: Array;\n}\nexport const RuntimeSpec: Codec;\n/** Runtime attached to follow events, either a decoded spec or a decode error. */\nexport type RuntimeType = \n/** Runtime spec decoded successfully. */\n{\n tag: \"Valid\";\n value: RuntimeSpec;\n}\n/** The runtime could not be decoded. */\n | {\n tag: \"Invalid\";\n value: {\n error: string;\n };\n};\nexport const RuntimeType: Codec;\n/** Outline of a background or border. */\nexport type Shape = \n/** Rounded corners with the given radius. */\n{\n tag: \"Rounded\";\n value: Size;\n}\n/** Circular shape. */\n | {\n tag: \"Circle\";\n value?: undefined;\n}\n/** Square corners. */\n | {\n tag: \"Square\";\n value?: undefined;\n};\nexport const Shape: Codec;\n/** A statement with a required (not optional) proof. */\nexport interface SignedStatement {\n /** Required cryptographic proof. */\n proof: StatementProof;\n /** Optional decryption key. */\n decryptionKey?: HexString;\n /** Optional Unix timestamp expiry. */\n expiry?: bigint;\n /** Optional channel. */\n channel?: HexString;\n /** [u8; 32] tags. */\n topics: Array;\n /** Optional data payload. */\n data?: HexString;\n}\nexport const SignedStatement: Codec;\n/** A size in logical pixels, SCALE-encoded as `Compact`. */\nexport type Size = number | bigint;\nexport const Size: Codec;\n/** A statement with optional proof and metadata. */\nexport interface Statement {\n /** Optional cryptographic proof. */\n proof?: StatementProof;\n /** Optional decryption key. */\n decryptionKey?: HexString;\n /** Optional Unix timestamp expiry. */\n expiry?: bigint;\n /** Optional channel. */\n channel?: HexString;\n /** [u8; 32] tags. */\n topics: Array;\n /** Optional data payload. */\n data?: HexString;\n}\nexport const Statement: Codec;\n/** Cryptographic proof for a statement. */\nexport type StatementProof = \n/** Sr25519 signature proof. */\n{\n tag: \"Sr25519\";\n value: {\n signature: HexString;\n signer: HexString;\n };\n}\n/** Ed25519 signature proof. */\n | {\n tag: \"Ed25519\";\n value: {\n signature: HexString;\n signer: HexString;\n };\n}\n/** ECDSA signature proof. */\n | {\n tag: \"Ecdsa\";\n value: {\n signature: HexString;\n signer: HexString;\n };\n}\n/** On-chain event proof. */\n | {\n tag: \"OnChain\";\n value: {\n who: HexString;\n blockHash: HexString;\n event: bigint;\n };\n};\nexport const StatementProof: Codec;\n/** A single key query within a chain-head storage request. */\nexport interface StorageQueryItem {\n /** Storage key to query. */\n key: HexString;\n /** What to return. */\n queryType: StorageQueryType;\n}\nexport const StorageQueryItem: Codec;\n/** What a chain-head storage query returns for a key. */\nexport type StorageQueryType = \"Value\" | \"Hash\" | \"ClosestDescendantMerkleValue\" | \"DescendantsValues\" | \"DescendantsHashes\";\nexport const StorageQueryType: Codec;\n/** Result for one queried storage key. */\nexport interface StorageResultItem {\n /** The queried key. */\n key: HexString;\n /** Value, if requested. */\n value?: HexString;\n /** Hash, if requested. */\n hash?: HexString;\n /** Merkle value, if requested. */\n closestDescendantMerkleValue?: HexString;\n}\nexport const StorageResultItem: Codec;\n/** Properties of a `TextField`. */\nexport interface TextFieldProps {\n /** Current value. */\n text: string;\n /** Shown when the value is empty. */\n placeholder?: string;\n /** Field label. */\n label?: string;\n /** Whether the field accepts input. Absent leaves the default to the host. */\n enabled?: boolean;\n /**\n * Action triggered on every value change. The action carries the new\n * value as UTF-8 bytes, with no length prefix.\n */\n valueChangeAction?: string;\n}\nexport const TextFieldProps: Codec;\n/** Properties of a `Text`. */\nexport interface TextProps {\n /** Typography preset. */\n style?: TypographyStyle;\n /** Text color. */\n color?: ColorToken;\n}\nexport const TextProps: Codec;\n/** Identifies a named theme. */\nexport type ThemeName = \n/** A custom named theme. */\n{\n tag: \"Custom\";\n value: string;\n}\n/** The host's default theme. */\n | {\n tag: \"Default\";\n value?: undefined;\n};\nexport const ThemeName: Codec;\n/** Light or dark variant. */\nexport type ThemeVariant = \"Light\" | \"Dark\";\nexport const ThemeVariant: Codec;\n/** A signed extension for a transaction payload. */\nexport interface TxPayloadExtension {\n /** Extension name (e.g., `\"CheckSpecVersion\"`). */\n id: string;\n /** SCALE-encoded extra data (in extrinsic body). */\n extra: HexString;\n /** SCALE-encoded implicit data (signed, not in body). */\n additionalSigned: HexString;\n}\nexport const TxPayloadExtension: Codec;\n/** Typography presets, resolved by the host's design system. */\nexport type TypographyStyle = \"HeadlineLarge\" | \"TitleMediumRegular\" | \"BodyLargeRegular\" | \"BodyMediumRegular\" | \"BodySmallRegular\";\nexport const TypographyStyle: Codec;\n/** User's authentication state. */\nexport type HostAccountConnectionStatusSubscribeItem = \"Disconnected\" | \"Connected\";\nexport const HostAccountConnectionStatusSubscribeItem: Codec;\n/** Error returned when ring VRF proof creation fails. */\nexport type HostAccountCreateProofError = \n/** Ring not available at the specified location. */\n{\n tag: \"RingNotFound\";\n value?: undefined;\n}\n/** The registered member key is not a member of the requested ring. */\n | {\n tag: \"NotMember\";\n value?: undefined;\n}\n/** The key handle is not registered. */\n | {\n tag: \"KeyNotRegistered\";\n value?: undefined;\n}\n/** The key handle is not registered for the requested ring. */\n | {\n tag: \"KeyNotInRing\";\n value?: undefined;\n}\n/** The foreign key owner has not allowlisted the caller. */\n | {\n tag: \"NotAllowlisted\";\n value?: undefined;\n}\n/** User or host rejected. */\n | {\n tag: \"Rejected\";\n value?: undefined;\n}\n/** Catch-all. */\n | {\n tag: \"Unknown\";\n value: {\n reason: string;\n };\n};\nexport const HostAccountCreateProofError: Codec;\n/** Request to create a ring VRF proof. */\nexport interface HostAccountCreateProofRequest {\n /** Ring-VRF key handle naming the member key to use. */\n keyHandle: ProductAccountId;\n /** Product-scoped context the derived alias is bound to. */\n context: ProductProofContext;\n /** Ring to generate the proof against. */\n ringLocation: RingLocation;\n /** Opaque message bound into the proof. */\n message: HexString;\n}\nexport const HostAccountCreateProofRequest: Codec;\n/**\n * Response containing a ring VRF proof and the values needed to verify it\n * against a downstream precompile.\n */\nexport interface HostAccountCreateProofResponse {\n /** Variable-length ring VRF proof bytes. */\n proof: HexString;\n /** Alias derived for the request's context. */\n contextualAlias: ContextualAlias;\n /** Index of the selected member key within the ring. */\n ringIndex: number;\n /** Ring revision the proof was generated against. */\n ringRevision: number;\n}\nexport const HostAccountCreateProofResponse: Codec;\n/** Error returned when contextual alias derivation fails. */\nexport type HostAccountGetAliasError = \n/** Ring not available at the specified location. */\n{\n tag: \"RingNotFound\";\n value?: undefined;\n}\n/** The registered member key is not a member of the requested ring. */\n | {\n tag: \"NotMember\";\n value?: undefined;\n}\n/** The key handle is not registered. */\n | {\n tag: \"KeyNotRegistered\";\n value?: undefined;\n}\n/** The key handle is not registered for the requested ring. */\n | {\n tag: \"KeyNotInRing\";\n value?: undefined;\n}\n/** User or host rejected. */\n | {\n tag: \"Rejected\";\n value?: undefined;\n}\n/** Catch-all. */\n | {\n tag: \"Unknown\";\n value: {\n reason: string;\n };\n};\nexport const HostAccountGetAliasError: Codec;\n/** Request to retrieve the contextual alias for a context and ring. */\nexport interface HostAccountGetAliasRequest {\n /** Ring-VRF key handle naming the member key to use. */\n keyHandle: ProductAccountId;\n /** Product-scoped context to derive the alias for. */\n context: ProductProofContext;\n /** Ring whose member key the host should use; matches `create_proof`. */\n ringLocation: RingLocation;\n}\nexport const HostAccountGetAliasRequest: Codec;\n/** Error returned when credential/account requests fail. */\nexport type HostAccountGetError = \n/** User is not logged in. */\n{\n tag: \"NotConnected\";\n value?: undefined;\n}\n/** User or host rejected the request. */\n | {\n tag: \"Rejected\";\n value?: undefined;\n}\n/** Domain identifier is invalid. */\n | {\n tag: \"DomainNotValid\";\n value?: undefined;\n}\n/** Catch-all error with reason. */\n | {\n tag: \"Unknown\";\n value: {\n reason: string;\n };\n};\nexport const HostAccountGetError: Codec;\n/** Request to retrieve a product-scoped account. */\nexport interface HostAccountGetRequest {\n /** Product account to retrieve. */\n productAccountId: ProductAccountId;\n}\nexport const HostAccountGetRequest: Codec;\n/** Response containing a product-scoped account. */\nexport interface HostAccountGetResponse {\n /** Retrieved product account. */\n account: ProductAccount;\n}\nexport const HostAccountGetResponse: Codec;\n/** Error returned when listing ring-VRF keys fails. */\nexport type HostAccountListRingVrfKeysError = \n/** User is not logged in. */\n{\n tag: \"NotConnected\";\n value?: undefined;\n}\n/** User or host rejected. */\n | {\n tag: \"Rejected\";\n value?: undefined;\n}\n/** Catch-all. */\n | {\n tag: \"Unknown\";\n value: {\n reason: string;\n };\n};\nexport const HostAccountListRingVrfKeysError: Codec;\n/** Request to list registered ring-VRF keys for an owner product. */\nexport interface HostAccountListRingVrfKeysRequest {\n /** Product whose registry entries should be listed. */\n owner: string;\n /** Disclosure level requested by the caller. */\n disclosure: RingVrfKeyDisclosure;\n}\nexport const HostAccountListRingVrfKeysRequest: Codec;\n/** Error returned when ring-VRF key registration fails. */\nexport type HostAccountRegisterRingVrfKeyError = \n/** User is not logged in. */\n{\n tag: \"NotConnected\";\n value?: undefined;\n}\n/** Ring not available at the specified location. */\n | {\n tag: \"RingNotFound\";\n value?: undefined;\n}\n/** User or host rejected. */\n | {\n tag: \"Rejected\";\n value?: undefined;\n}\n/** Catch-all. */\n | {\n tag: \"Unknown\";\n value: {\n reason: string;\n };\n};\nexport const HostAccountRegisterRingVrfKeyError: Codec;\n/** Request to register a ring-VRF key owned by the calling product. */\nexport interface HostAccountRegisterRingVrfKeyRequest {\n /** Key derivation index within the caller's ring-VRF domain. */\n index: DerivationIndex;\n /** Ring this key is declared for. */\n ring: RingLocation;\n}\nexport const HostAccountRegisterRingVrfKeyRequest: Codec;\n/** Error returned when direct ring-VRF key signing fails. */\nexport type HostAccountRingVrfSignError = \n/** User is not logged in. */\n{\n tag: \"NotConnected\";\n value?: undefined;\n}\n/** The key handle is not registered. */\n | {\n tag: \"KeyNotRegistered\";\n value?: undefined;\n}\n/** The foreign key owner has not allowlisted the caller. */\n | {\n tag: \"NotAllowlisted\";\n value?: undefined;\n}\n/** User or host rejected. */\n | {\n tag: \"Rejected\";\n value?: undefined;\n}\n/** Catch-all. */\n | {\n tag: \"Unknown\";\n value: {\n reason: string;\n };\n};\nexport const HostAccountRingVrfSignError: Codec;\n/** Request to sign bytes with a registered ring-VRF key. */\nexport interface HostAccountRingVrfSignRequest {\n /** Registered key handle. */\n keyHandle: ProductAccountId;\n /** Opaque message to sign. */\n message: HexString;\n}\nexport const HostAccountRingVrfSignRequest: Codec;\n/** Error returned when VRF signing fails. */\nexport type HostAccountSignVrfError = \n/** User is not logged in. */\n{\n tag: \"NotConnected\";\n value?: undefined;\n}\n/** User or host rejected the signing confirmation. */\n | {\n tag: \"Rejected\";\n value?: undefined;\n}\n/** Catch-all. */\n | {\n tag: \"Unknown\";\n value: {\n reason: string;\n };\n};\nexport const HostAccountSignVrfError: Codec;\n/**\n * Request to produce an sr25519 VRF signature from a product account over a\n * caller-supplied Merlin transcript.\n */\nexport interface HostAccountSignVrfRequest {\n /** Account whose key signs the VRF. */\n account: ProductAccountId;\n /** Root domain-separation label: `Transcript::new(transcript_label)`. */\n transcriptLabel: HexString;\n /** Transcript items replayed in order as `append_message(label, value)`. */\n items: Array;\n}\nexport const HostAccountSignVrfRequest: Codec;\n/** A chat action received from the host. */\nexport interface HostChatActionSubscribeItem {\n /** Room where the action occurred. */\n roomId: string;\n /** Peer who initiated the action. */\n peer: string;\n /** The action payload. */\n payload: ChatActionPayload;\n}\nexport const HostChatActionSubscribeItem: Codec;\n/** Chat room registration error. */\nexport type HostChatCreateRoomError = \n/** Not allowed. */\n{\n tag: \"PermissionDenied\";\n value?: undefined;\n}\n/** Catch-all. */\n | {\n tag: \"Unknown\";\n value: {\n reason: string;\n };\n};\nexport const HostChatCreateRoomError: Codec;\n/** Request to create a chat room. */\nexport interface HostChatCreateRoomRequest {\n /** Unique room identifier. */\n roomId: string;\n /** Room display name. */\n name: string;\n /** URL or base64 image. */\n icon: string;\n}\nexport const HostChatCreateRoomRequest: Codec;\n/** Result of a room registration. */\nexport interface HostChatCreateRoomResponse {\n /** `New` or `Exists`. */\n status: ChatRoomRegistrationStatus;\n}\nexport const HostChatCreateRoomResponse: Codec;\n/** Item containing the current chat rooms. */\nexport interface HostChatListSubscribeItem {\n /** Chat rooms the product participates in. */\n rooms: Array;\n}\nexport const HostChatListSubscribeItem: Codec;\n/** Chat message posting error. */\nexport type HostChatPostMessageError = \n/** Message exceeded size limit. */\n{\n tag: \"MessageTooLarge\";\n value?: undefined;\n}\n/** Catch-all. */\n | {\n tag: \"Unknown\";\n value: {\n reason: string;\n };\n};\nexport const HostChatPostMessageError: Codec;\n/** Request to post a message to a chat room. */\nexport interface HostChatPostMessageRequest {\n /** Room to post to. */\n roomId: string;\n /** Message content. */\n payload: ChatMessageContent;\n}\nexport const HostChatPostMessageRequest: Codec;\n/** Result of posting a message. */\nexport interface HostChatPostMessageResponse {\n /**\n * Host-assigned message id, and the correlation key for any action the\n * message carries: a trigger names it in [`ActionTrigger::message_id`].\n */\n messageId: string;\n}\nexport const HostChatPostMessageResponse: Codec;\n/** Chat bot registration error. */\nexport type HostChatRegisterBotError = \n/** Not allowed. */\n{\n tag: \"PermissionDenied\";\n value?: undefined;\n}\n/** Catch-all. */\n | {\n tag: \"Unknown\";\n value: {\n reason: string;\n };\n};\nexport const HostChatRegisterBotError: Codec;\n/** Request to register a chat bot. */\nexport interface HostChatRegisterBotRequest {\n /** Unique bot identifier. */\n botId: string;\n /** Bot display name. */\n name: string;\n /** URL or base64 image. */\n icon: string;\n}\nexport const HostChatRegisterBotRequest: Codec;\n/** Result of a bot registration. */\nexport interface HostChatRegisterBotResponse {\n /** `New` or `Exists`. */\n status: ChatBotRegistrationStatus;\n}\nexport const HostChatRegisterBotResponse: Codec;\n/** Request to create a cheque from a local purse to a receivable. */\nexport interface HostCoinPaymentCreateChequeRequest {\n /** Source purse. */\n from: number;\n /** Destination receivable. */\n to: HexString;\n /** Payment amount. */\n amount: number;\n}\nexport const HostCoinPaymentCreateChequeRequest: Codec;\n/** Created cheque response. */\nexport interface HostCoinPaymentCreateChequeResponse {\n /** Encrypted cheque. */\n cheque: CoinPaymentCheque;\n}\nexport const HostCoinPaymentCreateChequeResponse: Codec;\n/** Request to create a new firewalled CoinPayment purse. */\nexport interface HostCoinPaymentCreatePurseRequest {\n /** Human-readable purse name. */\n name: string;\n}\nexport const HostCoinPaymentCreatePurseRequest: Codec;\n/** Created purse identifier. */\nexport interface HostCoinPaymentCreatePurseResponse {\n /** Assigned purse identifier. */\n purse: number;\n}\nexport const HostCoinPaymentCreatePurseResponse: Codec;\n/** Request to create a fresh receivable for a purse. */\nexport interface HostCoinPaymentCreateReceivableRequest {\n /** Target purse for future deposits. */\n into: number;\n}\nexport const HostCoinPaymentCreateReceivableRequest: Codec;\n/** Created receivable response. */\nexport interface HostCoinPaymentCreateReceivableResponse {\n /** Receivable public key. */\n receivable: HexString;\n}\nexport const HostCoinPaymentCreateReceivableResponse: Codec;\n/** Request to delete a purse after draining its balance. */\nexport interface HostCoinPaymentDeletePurseRequest {\n /** Purse to delete. */\n target: number;\n /** Purse that receives drained funds. */\n drainInto: number;\n}\nexport const HostCoinPaymentDeletePurseRequest: Codec;\n/** Request to deposit a cheque into the purse associated with its receivable. */\nexport interface HostCoinPaymentDepositRequest {\n /** Cheque to deposit. */\n cheque: CoinPaymentCheque;\n}\nexport const HostCoinPaymentDepositRequest: Codec;\n/** Stream item for `host_coin_payment_listen_for`. */\nexport type HostCoinPaymentListenForItem = \n/** Handoff channel suitable for inclusion in an invoice. */\n{\n tag: \"Channel\";\n value: CoinPaymentTransmissionChannel;\n}\n/** Cheque received through the handoff channel. */\n | {\n tag: \"Cheque\";\n value: CoinPaymentCheque;\n};\nexport const HostCoinPaymentListenForItem: Codec;\n/** Request to listen for a cheque delivered to a receivable. */\nexport interface HostCoinPaymentListenForRequest {\n /** Receivable to listen for. */\n receivable: HexString;\n}\nexport const HostCoinPaymentListenForRequest: Codec;\n/** Request to query product-visible purse metadata. */\nexport interface HostCoinPaymentQueryPurseRequest {\n /** Purse to query. */\n purse: number;\n}\nexport const HostCoinPaymentQueryPurseRequest: Codec;\n/** Product-visible purse metadata response. */\nexport interface HostCoinPaymentQueryPurseResponse {\n /** Purse information. */\n info: CoinPaymentPurseInfo;\n}\nexport const HostCoinPaymentQueryPurseResponse: Codec;\n/** Request to transfer balance between local purses. */\nexport interface HostCoinPaymentRebalancePurseRequest {\n /** Source purse. */\n from: number;\n /** Destination purse. */\n to: number;\n /** Amount to move. */\n amount: number;\n}\nexport const HostCoinPaymentRebalancePurseRequest: Codec;\n/** Request to refund coins associated with a receivable. */\nexport interface HostCoinPaymentRefundRequest {\n /** Receivable to refund. */\n receivable: HexString;\n}\nexport const HostCoinPaymentRefundRequest: Codec;\n/**\n * Error returned by the contact picker.\n *\n * Neither a dismissal nor an empty contact list is an error; both are outcomes.\n * A host that serves no picker at all answers `Unsupported` at the framework\n * level rather than through this enum.\n */\nexport type HostContactsPickError = \n/** No active session. */\n{\n tag: \"NotConnected\";\n value?: undefined;\n}\n/** Catch-all. */\n | {\n tag: \"Unknown\";\n value: {\n reason: string;\n };\n};\nexport const HostContactsPickError: Codec;\n/**\n * Request to open the host's contact picker.\n *\n * Carries no arguments: the host owns the overlay, draws it from its own chat\n * contacts, and nothing the product supplies appears in it.\n */\nexport interface HostContactsPickRequest {\n}\nexport const HostContactsPickRequest: Codec;\n/** Outcome of a pick. */\nexport interface HostContactsPickResponse {\n /** How the pick ended. */\n outcome: ContactPickOutcome;\n}\nexport const HostContactsPickResponse: Codec;\n/** Transaction creation error. */\nexport type HostCreateTransactionError = \n/** Payload could not be deserialized. */\n{\n tag: \"FailedToDecode\";\n value?: undefined;\n}\n/** User rejected. */\n | {\n tag: \"Rejected\";\n value?: undefined;\n}\n/** Unsupported payload version or extension. */\n | {\n tag: \"NotSupported\";\n value: {\n reason: string;\n };\n}\n/** Not authenticated. */\n | {\n tag: \"PermissionDenied\";\n value?: undefined;\n}\n/** Catch-all. */\n | {\n tag: \"Unknown\";\n value: {\n reason: string;\n };\n}\n/**\n * A declared contact handle names nobody this host has a contact for, or\n * does not appear in the call it was declared for, or a handle appears in\n * the call without being declared. One refusal for all three, because\n * telling them apart would say whether a handle is current.\n */\n | {\n tag: \"UnknownContact\";\n value?: undefined;\n};\nexport const HostCreateTransactionError: Codec;\n/** Response containing a created transaction. */\nexport interface HostCreateTransactionResponse {\n /**\n * SCALE-encoded transaction, signed unless the request supplied its own\n * V5 `VerifyMultiSignature` extension.\n */\n transaction: HexString;\n}\nexport const HostCreateTransactionResponse: Codec;\n/** Response containing a transaction created with a non-product account. */\nexport interface HostCreateTransactionWithLegacyAccountResponse {\n /**\n * SCALE-encoded transaction, signed unless the request supplied its own\n * V5 `VerifyMultiSignature` extension.\n */\n transaction: HexString;\n}\nexport const HostCreateTransactionWithLegacyAccountResponse: Codec;\n/** Error from [`crate::api::Entropy::derive`] (RFC 0007). */\nexport type HostDeriveEntropyError = \n/** Catch-all. */\n{\n tag: \"Unknown\";\n value: {\n reason: string;\n };\n};\nexport const HostDeriveEntropyError: Codec;\n/**\n * Request to derive deterministic per-product entropy (RFC 0007).\n *\n * The host derives 32 bytes from product-scoped seed material and `context`.\n * Repeated calls with the same `context` for the same product yield the same\n * entropy.\n */\nexport interface HostDeriveEntropyRequest {\n /** Domain-separated derivation context. */\n context: HexString;\n}\nexport const HostDeriveEntropyRequest: Codec;\n/** Response carrying 32 bytes of deterministically derived entropy. */\nexport interface HostDeriveEntropyResponse {\n /** 32 bytes of derived entropy. */\n entropy: HexString;\n}\nexport const HostDeriveEntropyResponse: Codec;\n/**\n * Device-capability permission requested from the host (RFC 0002).\n *\n * Lasting grants and denials survive app restarts. A host may also offer a\n * one-use grant, held in memory until a permission-gated operation consumes it.\n *\n * That decision is about this product. The OS grant behind it belongs to the\n * host application and can move independently, so a host that can read OS\n * state has the capability resolve only while both allow it: a stored grant\n * whose OS grant was revoked answers `granted: false` without a prompt. An OS\n * grant that is merely undetermined does not change the answer, because the OS\n * resolves its own gate when the capability is used.\n */\nexport type HostDevicePermissionRequest = \"Notifications\" | \"Camera\" | \"Microphone\" | \"Bluetooth\" | \"NFC\" | \"Location\" | \"Clipboard\" | \"OpenUrl\" | \"Biometrics\";\nexport const HostDevicePermissionRequest: Codec;\n/** Outcome of a device-permission request. */\nexport interface HostDevicePermissionResponse {\n /** Whether the permission was granted. */\n granted: boolean;\n}\nexport const HostDevicePermissionResponse: Codec;\n/** Request to query whether a feature is supported by the host. */\nexport type HostFeatureSupportedRequest = \n/** Ask whether the host can interact with the chain identified by genesis hash. */\n{\n tag: \"Chain\";\n value: {\n genesisHash: HexString;\n };\n};\nexport const HostFeatureSupportedRequest: Codec;\n/** Response to a feature-support query. */\nexport interface HostFeatureSupportedResponse {\n /** Whether the feature is supported. */\n supported: boolean;\n}\nexport const HostFeatureSupportedResponse: Codec;\n/** Response containing all legacy (user-imported) accounts owned by the user. */\nexport interface HostGetLegacyAccountsResponse {\n /** Legacy accounts. */\n accounts: Array;\n}\nexport const HostGetLegacyAccountsResponse: Codec;\n/** Response containing the product context bound to the current host runtime. */\nexport interface HostGetProductContextResponse {\n /** Full canonical identifier used for authorization and account derivation. */\n productId: string;\n}\nexport const HostGetProductContextResponse: Codec;\n/** Error from [`crate::api::Account::get_user_id`]. */\nexport type HostGetUserIdError = \n/** User denied the identity disclosure request. */\n{\n tag: \"PermissionDenied\";\n value?: undefined;\n}\n/** User is not logged in. */\n | {\n tag: \"NotConnected\";\n value?: undefined;\n}\n/** Catch-all. */\n | {\n tag: \"Unknown\";\n value: {\n reason: string;\n };\n};\nexport const HostGetUserIdError: Codec;\n/** The user's primary DotNS account identity. */\nexport interface HostGetUserIdResponse {\n /** The user's primary DotNS username. */\n primaryUsername: string;\n}\nexport const HostGetUserIdResponse: Codec;\n/**\n * Error from [`crate::api::System::handshake`] (RFC 0009).\n *\n * The handshake is the first call on a fresh connection; it does not require\n * user authentication and is used to negotiate the wire codec version.\n */\nexport type HostHandshakeError = \n/** Host did not complete the handshake in time. */\n{\n tag: \"Timeout\";\n value?: undefined;\n}\n/** Host does not speak the codec version requested by the product. */\n | {\n tag: \"UnsupportedProtocolVersion\";\n value?: undefined;\n}\n/** Catch-all. */\n | {\n tag: \"Unknown\";\n value: GenericError;\n};\nexport const HostHandshakeError: Codec;\n/** Wire-codec negotiation payload sent by the product (RFC 0009). */\nexport interface HostHandshakeRequest {\n /** Wire codec version requested by the product. */\n codecVersion: number;\n}\nexport const HostHandshakeRequest: Codec;\n/** Failure to close a connection. */\nexport type HostJamPeerTransportCloseError = \"Closed\";\nexport const HostJamPeerTransportCloseError: Codec;\n/** Close a connection and every stream on it. */\nexport interface HostJamPeerTransportCloseRequest {\n /** Connection to close. */\n conn: number;\n}\nexport const HostJamPeerTransportCloseRequest: Codec;\n/** Failure to dial a JAM peer. */\nexport type HostJamPeerTransportDialError = \"NotGranted\" | \"Refused\" | \"Limit\" | \"Unreachable\";\nexport const HostJamPeerTransportDialError: Codec;\n/** Dial one JAM peer over JAMNP-S (QUIC) or WebTransport. */\nexport interface HostJamPeerTransportDialRequest {\n /**\n * Genesis header hash; the host derives the ALPN from it and requires a\n * `RemotePermission::JamPeers` grant for it.\n */\n genesis: HexString;\n /** Peer IP address, IPv6 or v4-mapped IPv6. */\n ip: HexString;\n /** Peer UDP port. */\n port: number;\n /** Ed25519 key the peer's TLS certificate must carry. */\n ed25519: HexString;\n /** Compressed P-256 peer key for WebTransport certificate hashes. */\n p256?: HexString;\n}\nexport const HostJamPeerTransportDialRequest: Codec;\n/** An open connection handle. */\nexport interface HostJamPeerTransportDialResponse {\n /** Execution-local connection id. */\n conn: number;\n}\nexport const HostJamPeerTransportDialResponse: Codec;\n/** Failure to drain events. */\nexport type HostJamPeerTransportEventsError = \"NotGranted\";\nexport const HostJamPeerTransportEventsError: Codec;\n/** Events in arrival order. */\nexport interface HostJamPeerTransportEventsResponse {\n /** Pending events; empty when nothing happened. */\n events: Array;\n}\nexport const HostJamPeerTransportEventsResponse: Codec;\n/** Failure to open a stream. */\nexport type HostJamPeerTransportOpenError = \"NotGranted\" | \"Closed\" | \"Limit\";\nexport const HostJamPeerTransportOpenError: Codec;\n/** Open a bidirectional stream and send its kind byte. */\nexport interface HostJamPeerTransportOpenRequest {\n /** Connection returned by `dial`. */\n conn: number;\n /** JAMNP-S stream kind (UP 0, CE 128, ...). */\n kind: number;\n}\nexport const HostJamPeerTransportOpenRequest: Codec;\n/** An open stream handle. */\nexport interface HostJamPeerTransportOpenResponse {\n /** Execution-local stream id. */\n stream: number;\n}\nexport const HostJamPeerTransportOpenResponse: Codec;\n/** Failure to receive from a stream. */\nexport type HostJamPeerTransportRecvError = \"Closed\";\nexport const HostJamPeerTransportRecvError: Codec;\n/** Poll one complete framed message without blocking. */\nexport interface HostJamPeerTransportRecvRequest {\n /** Stream to read from. */\n stream: number;\n /** Largest message the caller accepts. */\n max: number;\n}\nexport const HostJamPeerTransportRecvRequest: Codec;\n/** One unframed message, or none available yet. */\nexport interface HostJamPeerTransportRecvResponse {\n /**\n * Complete message bytes without length prefix, or `None` when nothing\n * has arrived yet.\n */\n message?: HexString;\n /** The peer finished its send side; no further messages will arrive. */\n fin: boolean;\n /** The peer reset the stream; buffered data may be incomplete. */\n reset: boolean;\n}\nexport const HostJamPeerTransportRecvResponse: Codec;\n/** Failure to reset a stream. */\nexport type HostJamPeerTransportResetError = \"Closed\";\nexport const HostJamPeerTransportResetError: Codec;\n/** Abort both directions of a stream. */\nexport interface HostJamPeerTransportResetRequest {\n /** Stream to reset. */\n stream: number;\n}\nexport const HostJamPeerTransportResetRequest: Codec;\n/** Failure to send a message. */\nexport type HostJamPeerTransportSendError = \"Closed\" | \"TooLarge\" | \"Limit\";\nexport const HostJamPeerTransportSendError: Codec;\n/** Send one framed message; the host adds the `u32` little-endian length. */\nexport interface HostJamPeerTransportSendRequest {\n /** Stream returned by `open` or reported by an `Accepted` event. */\n stream: number;\n /** Message bytes without length prefix. */\n message: HexString;\n /** Finish the send side after this message. */\n fin: boolean;\n}\nexport const HostJamPeerTransportSendRequest: Codec;\n/** A change to a subscribed storage key, pushed to the subscriber. */\nexport interface HostLocalStorageChangeItem {\n /** Value after the change. `Some` on write, `None` after clear. */\n value?: HexString;\n}\nexport const HostLocalStorageChangeItem: Codec;\n/** Request to clear a local storage key. */\nexport interface HostLocalStorageClearRequest {\n /** Storage key to clear. */\n key: string;\n}\nexport const HostLocalStorageClearRequest: Codec;\n/** Local storage operation error. */\nexport type V01HostLocalStorageReadError = \n/** Storage quota exceeded. */\n{\n tag: \"Full\";\n value?: undefined;\n}\n/** Catch-all. */\n | {\n tag: \"Unknown\";\n value: {\n reason: string;\n };\n};\nexport const V01HostLocalStorageReadError: Codec;\n/** Request to read a local storage value. */\nexport interface V01HostLocalStorageReadRequest {\n /** Storage key to read. */\n key: string;\n}\nexport const V01HostLocalStorageReadRequest: Codec;\n/** Response containing an optional local storage value. */\nexport interface HostLocalStorageReadResponse {\n /** Stored value, if present. */\n value?: HexString;\n}\nexport const HostLocalStorageReadResponse: Codec;\n/** Request to subscribe to changes of one local storage key. */\nexport interface HostLocalStorageSubscribeRequest {\n /** Storage key to observe. */\n key: string;\n}\nexport const HostLocalStorageSubscribeRequest: Codec;\n/** Request to write a value into local storage. */\nexport interface HostLocalStorageWriteRequest {\n /** Storage key to write. */\n key: string;\n /** Value to store at the key. */\n value: HexString;\n}\nexport const HostLocalStorageWriteRequest: Codec;\n/** Locale the host currently presents its interface in, pushed to subscribers. */\nexport interface V01HostLocaleSubscribeItem {\n /**\n * BCP 47 language tag, such as `en`, `pt-BR` or `zh-Hans`. The set is\n * open: a product that does not ship the tag chooses its own fallback.\n */\n languageTag: string;\n}\nexport const V01HostLocaleSubscribeItem: Codec;\n/** Error from [`crate::api::System::navigate_to`]. */\nexport type HostNavigateToError = \n/**\n * The target host is not authorized for outbound access: the user answered\n * no to the prompt, a stored decision already refused it, or no prompt\n * could be put to the user.\n */\n{\n tag: \"PermissionDenied\";\n value?: undefined;\n}\n/** Catch-all. */\n | {\n tag: \"Unknown\";\n value: {\n reason: string;\n };\n};\nexport const HostNavigateToError: Codec;\n/** Request to navigate the host to an external URL. */\nexport interface HostNavigateToRequest {\n /** URL to open. */\n url: string;\n}\nexport const HostNavigateToRequest: Codec;\n/**\n * Error from [`crate::api::Payment::balance_subscribe`].\n *\n * See [RFC 0006].\n *\n * [RFC 0006]: https://github.com/paritytech/triangle-js-sdks/pull/94\n */\nexport type HostPaymentBalanceSubscribeError = \n/** User denied the balance disclosure request. */\n{\n tag: \"PermissionDenied\";\n value?: undefined;\n}\n/** Catch-all. */\n | {\n tag: \"Unknown\";\n value: {\n reason: string;\n };\n};\nexport const HostPaymentBalanceSubscribeError: Codec;\n/**\n * Current payment balance state pushed to subscribers.\n *\n * See [RFC 0006].\n *\n * [RFC 0006]: https://github.com/paritytech/triangle-js-sdks/pull/94\n */\nexport interface HostPaymentBalanceSubscribeItem {\n /** Balance that can be spent right now. */\n available: bigint;\n}\nexport const HostPaymentBalanceSubscribeItem: Codec;\n/** Request to subscribe to payment balance updates. */\nexport interface HostPaymentBalanceSubscribeRequest {\n /** Optional purse selector. `None` means MAIN_PURSE. */\n purse?: number;\n}\nexport const HostPaymentBalanceSubscribeRequest: Codec;\n/**\n * Error from [`crate::api::Payment::request`].\n *\n * See [RFC 0006].\n *\n * [RFC 0006]: https://github.com/paritytech/triangle-js-sdks/pull/94\n */\nexport type HostPaymentError = \n/** User rejected the payment request. */\n{\n tag: \"Rejected\";\n value?: undefined;\n}\n/** User's available balance is not sufficient for the requested amount. */\n | {\n tag: \"InsufficientBalance\";\n value?: undefined;\n}\n/** Catch-all. */\n | {\n tag: \"Unknown\";\n value: {\n reason: string;\n };\n};\nexport const HostPaymentError: Codec;\n/** Request to initiate a payment to another account. */\nexport interface HostPaymentRequest {\n /** Optional purse selector. `None` means MAIN_PURSE. */\n from?: number;\n /** Amount to pay. */\n amount: bigint;\n /** Destination account. */\n destination: HexString;\n}\nexport const HostPaymentRequest: Codec;\n/**\n * Receipt returned after a successful payment request.\n *\n * See [RFC 0006].\n *\n * [RFC 0006]: https://github.com/paritytech/triangle-js-sdks/pull/94\n */\nexport interface HostPaymentResponse {\n /** The assigned payment identifier. */\n id: string;\n}\nexport const HostPaymentResponse: Codec;\n/**\n * Error from [`crate::api::Payment::status_subscribe`].\n *\n * See [RFC 0006].\n *\n * [RFC 0006]: https://github.com/paritytech/triangle-js-sdks/pull/94\n */\nexport type HostPaymentStatusSubscribeError = \n/** Payment ID was not found or does not belong to the current product. */\n{\n tag: \"PaymentNotFound\";\n value?: undefined;\n}\n/** Catch-all. */\n | {\n tag: \"Unknown\";\n value: {\n reason: string;\n };\n};\nexport const HostPaymentStatusSubscribeError: Codec;\n/**\n * Payment lifecycle status pushed to subscribers.\n *\n * Once a terminal state (`Completed` or `Failed`) is reached, the host\n * delivers it and may close the subscription.\n *\n * See [RFC 0006].\n *\n * [RFC 0006]: https://github.com/paritytech/triangle-js-sdks/pull/94\n */\nexport type HostPaymentStatusSubscribeItem = \n/** Payment is being processed. */\n{\n tag: \"Processing\";\n value?: undefined;\n}\n/** Payment has been settled successfully. */\n | {\n tag: \"Completed\";\n value?: undefined;\n}\n/** Payment has failed. */\n | {\n tag: \"Failed\";\n value: {\n reason: string;\n };\n};\nexport const HostPaymentStatusSubscribeItem: Codec;\n/** Request to subscribe to a payment status. */\nexport interface HostPaymentStatusSubscribeRequest {\n /** Payment identifier to watch. */\n paymentId: string;\n}\nexport const HostPaymentStatusSubscribeRequest: Codec;\n/**\n * Error from [`crate::api::Payment::top_up`].\n *\n * See [RFC 0006].\n *\n * [RFC 0006]: https://github.com/paritytech/triangle-js-sdks/pull/94\n */\nexport type HostPaymentTopUpError = \n/** The source account does not hold sufficient funds. */\n{\n tag: \"InsufficientFunds\";\n value?: undefined;\n}\n/** The source account was not found or is invalid. */\n | {\n tag: \"InvalidSource\";\n value?: undefined;\n}\n/** Some coins were claimed but the total fell short of the requested amount. */\n | {\n tag: \"PartialPayment\";\n value: {\n credited: bigint;\n };\n}\n/** Catch-all. */\n | {\n tag: \"Unknown\";\n value: {\n reason: string;\n };\n};\nexport const HostPaymentTopUpError: Codec;\n/** Request to top up the product payment balance. */\nexport interface HostPaymentTopUpRequest {\n /** Optional purse selector. `None` means MAIN_PURSE. */\n into?: number;\n /** Amount to top up. */\n amount: bigint;\n /** Funding source for the top-up. */\n source: PaymentTopUpSource;\n}\nexport const HostPaymentTopUpRequest: Codec;\n/** The calling product's cards: the whole set on subscribe and after every change. */\nexport interface HostPocketListSubscribeItem {\n /** Cards currently in Pocket for the calling product. */\n cards: Array;\n}\nexport const HostPocketListSubscribeItem: Codec;\n/** Card removal failure. */\nexport type HostPocketRemoveCardError = \n/** The card is privileged and stays in Pocket. */\n{\n tag: \"Privileged\";\n value?: undefined;\n}\n/** Catch-all. */\n | {\n tag: \"Unknown\";\n value: {\n reason: string;\n };\n};\nexport const HostPocketRemoveCardError: Codec;\n/** Request to remove one of the calling product's cards. */\nexport interface HostPocketRemoveCardRequest {\n /** Card to remove. A card that is not present is already removed. */\n cardId: string;\n}\nexport const HostPocketRemoveCardRequest: Codec;\n/** Request to cancel a previously scheduled notification. */\nexport interface HostPushNotificationCancelRequest {\n /** The notification identifier returned by [`HostPushNotificationResponse`]. */\n id: number;\n}\nexport const HostPushNotificationCancelRequest: Codec;\n/** Push notification error. */\nexport type HostPushNotificationError = \n/** The host-wide queue of pending scheduled notifications is full. */\n{\n tag: \"ScheduleLimitReached\";\n value?: undefined;\n}\n/** Catch-all. */\n | {\n tag: \"Unknown\";\n value: {\n reason: string;\n };\n};\nexport const HostPushNotificationError: Codec;\n/**\n * Push notification payload.\n *\n * When `scheduled_at` is `Some`, the notification is deferred to the given\n * wall-clock instant (Unix milliseconds UTC). `None` fires immediately,\n * preserving prior behaviour. See [RFC 0019].\n *\n * [RFC 0019]: https://github.com/paritytech/trinity-user-agents/blob/main/docs/rfcs/0019-scheduled-notifications.md\n */\nexport interface HostPushNotificationRequest {\n /** Notification text. */\n text: string;\n /** Optional URL to open on tap. */\n deeplink?: string;\n /**\n * Optional Unix timestamp in milliseconds (UTC) at which the notification\n * should fire. `None` fires immediately.\n */\n scheduledAt?: bigint;\n}\nexport const HostPushNotificationRequest: Codec;\n/** Successful push notification response carrying the assigned id. */\nexport interface HostPushNotificationResponse {\n /** Host-assigned notification identifier. */\n id: number;\n}\nexport const HostPushNotificationResponse: Codec;\n/** An action triggered inside a product-rendered body. */\nexport interface HostRendererActionSubscribeItem {\n /** Where the body lives. */\n context: RenderContext;\n /** Which action was triggered, as named in the renderer tree. */\n actionId: string;\n /**\n * Data the node attached to the action. A `Button` press carries an\n * empty payload; a `TextField` value change carries the UTF-8 bytes of\n * the new value, with no length prefix.\n */\n payload: HexString;\n}\nexport const HostRendererActionSubscribeItem: Codec;\n/** Login request error. */\nexport type HostRequestLoginError = \n/** Catch-all. */\n{\n tag: \"Unknown\";\n value: {\n reason: string;\n };\n};\nexport const HostRequestLoginError: Codec;\n/** Request to present the host login flow. */\nexport interface HostRequestLoginRequest {\n /** Optional human-readable reason shown in the login UI. */\n reason?: string;\n}\nexport const HostRequestLoginRequest: Codec;\n/** Result of a login request. */\nexport type HostRequestLoginResponse = \"Success\" | \"AlreadyConnected\" | \"Rejected\";\nexport const HostRequestLoginResponse: Codec;\n/** Batched resource pre-allocation request (RFC 0010). */\nexport interface HostRequestResourceAllocationRequest {\n /** Resources to allocate. */\n resources: Array;\n}\nexport const HostRequestResourceAllocationRequest: Codec;\n/** Per-resource outcomes for a batched allocation request (RFC 0010). */\nexport interface HostRequestResourceAllocationResponse {\n /** Per-resource allocation outcomes, in the same order as the request. */\n outcomes: Array;\n}\nexport const HostRequestResourceAllocationResponse: Codec;\n/** Signing operation error. */\nexport type HostSignPayloadError = \n/** Payload could not be deserialized. */\n{\n tag: \"FailedToDecode\";\n value?: undefined;\n}\n/** User rejected signing. */\n | {\n tag: \"Rejected\";\n value?: undefined;\n}\n/** Not authenticated. */\n | {\n tag: \"PermissionDenied\";\n value?: undefined;\n}\n/** Catch-all. */\n | {\n tag: \"Unknown\";\n value: {\n reason: string;\n };\n};\nexport const HostSignPayloadError: Codec;\n/** Request to sign an extrinsic payload with a product account. */\nexport interface HostSignPayloadRequest {\n /** Product account that will sign this payload. */\n account: ProductAccountId;\n /** The extrinsic payload to sign. */\n payload: HostSignPayloadData;\n}\nexport const HostSignPayloadRequest: Codec;\n/** Result of a signing operation. */\nexport interface HostSignPayloadResponse {\n /** The cryptographic signature. */\n signature: HexString;\n /** Full signed transaction, if requested. */\n signedTransaction?: HexString;\n}\nexport const HostSignPayloadResponse: Codec;\n/**\n * Sign a Substrate extrinsic payload with a non-product (legacy) account.\n * Contains the same fields as [`HostSignPayloadRequest`] minus `address`\n * (replaced by `signer`).\n */\nexport interface HostSignPayloadWithLegacyAccountRequest {\n /** Signer address (SS58 or hex) of the legacy account. */\n signer: string;\n /** The extrinsic payload to sign. */\n payload: HostSignPayloadData;\n}\nexport const HostSignPayloadWithLegacyAccountRequest: Codec;\n/** A raw signing request pairing an account with the payload to sign. */\nexport interface HostSignRawRequest {\n /** Product account that will sign this payload. */\n account: ProductAccountId;\n /** The payload to sign. */\n payload: RawPayload;\n}\nexport const HostSignRawRequest: Codec;\n/**\n * Sign raw bytes with a non-product (legacy) account. The signer field\n * identifies which legacy account to use.\n */\nexport interface HostSignRawWithLegacyAccountRequest {\n /** Signer address (SS58 or hex) of the legacy account. */\n signer: string;\n /** The data to sign. */\n payload: RawPayload;\n}\nexport const HostSignRawWithLegacyAccountRequest: Codec;\n/** Current theme state pushed to subscribers. */\nexport interface HostThemeSubscribeItem {\n /** Theme name. */\n name: ThemeName;\n /** Light or dark variant. */\n variant: ThemeVariant;\n}\nexport const HostThemeSubscribeItem: Codec;\n/** Request to begin a pending operation. */\nexport interface HostWorkerBeginOperationRequest {\n /** Optional label for host logs and UI. */\n label?: string;\n}\nexport const HostWorkerBeginOperationRequest: Codec;\n/** Response carrying the id of a newly begun operation. */\nexport interface HostWorkerBeginOperationResponse {\n /** Id to pass to `end_operation`. */\n id: number;\n}\nexport const HostWorkerBeginOperationResponse: Codec;\n/** Request to end a pending operation. */\nexport interface HostWorkerEndOperationRequest {\n /** Id returned by `begin_operation`. */\n id: number;\n}\nexport const HostWorkerEndOperationRequest: Codec;\n/** A body the host needs drawn. */\nexport interface ProductRendererRenderRequest {\n /** Where the body lives. */\n context: RenderContext;\n /** Product-defined payload, opaque to the host. */\n payload: HexString;\n}\nexport const ProductRendererRenderRequest: Codec;\n/** Request to fetch the body of a pinned block. */\nexport interface RemoteChainHeadBodyRequest {\n /** Chain genesis hash. */\n genesisHash: HexString;\n /** Follow subscription identifier. */\n followSubscriptionId: string;\n /** Block hash. */\n hash: HexString;\n}\nexport const RemoteChainHeadBodyRequest: Codec;\n/** Response to a body request; results arrive as follow events. */\nexport interface RemoteChainHeadBodyResponse {\n /** Started operation result. */\n operation: OperationStartedResult;\n}\nexport const RemoteChainHeadBodyResponse: Codec;\n/** Request to invoke a runtime call at a pinned block. */\nexport interface RemoteChainHeadCallRequest {\n /** Chain genesis hash. */\n genesisHash: HexString;\n /** Follow subscription identifier. */\n followSubscriptionId: string;\n /** Block hash. */\n hash: HexString;\n /** Runtime API function name. */\n function: string;\n /** SCALE-encoded call parameters. */\n callParameters: HexString;\n}\nexport const RemoteChainHeadCallRequest: Codec;\n/** Response to a runtime call request; the output arrives as a follow event. */\nexport interface RemoteChainHeadCallResponse {\n /** Started operation result. */\n operation: OperationStartedResult;\n}\nexport const RemoteChainHeadCallResponse: Codec;\n/** Request to continue a paused chain-head operation. */\nexport interface RemoteChainHeadContinueRequest {\n /** Chain genesis hash. */\n genesisHash: HexString;\n /** Follow subscription identifier. */\n followSubscriptionId: string;\n /** Operation identifier. */\n operationId: string;\n}\nexport const RemoteChainHeadContinueRequest: Codec;\n/** Event emitted on a chain-head follow subscription. */\nexport type RemoteChainHeadFollowItem = \n/** First event of the subscription, describing the current finalized blocks. */\n{\n tag: \"Initialized\";\n value: {\n finalizedBlockHashes: Array;\n finalizedBlockRuntime?: RuntimeType;\n };\n}\n/** A new non-finalized block was announced. */\n | {\n tag: \"NewBlock\";\n value: {\n blockHash: HexString;\n parentBlockHash: HexString;\n newRuntime?: RuntimeType;\n };\n}\n/** The best block has changed. */\n | {\n tag: \"BestBlockChanged\";\n value: {\n bestBlockHash: HexString;\n };\n}\n/** One or more blocks were finalized. */\n | {\n tag: \"Finalized\";\n value: {\n finalizedBlockHashes: Array;\n prunedBlockHashes: Array;\n };\n}\n/** A body operation completed. */\n | {\n tag: \"OperationBodyDone\";\n value: {\n operationId: string;\n value: Array;\n };\n}\n/** A runtime call operation completed. */\n | {\n tag: \"OperationCallDone\";\n value: {\n operationId: string;\n output: HexString;\n };\n}\n/** A storage operation produced a batch of results. */\n | {\n tag: \"OperationStorageItems\";\n value: {\n operationId: string;\n items: Array;\n };\n}\n/** A storage operation finished emitting results. */\n | {\n tag: \"OperationStorageDone\";\n value: {\n operationId: string;\n };\n}\n/** A storage operation is paused until the product requests continuation. */\n | {\n tag: \"OperationWaitingForContinue\";\n value: {\n operationId: string;\n };\n}\n/** The operation failed because the required data was not accessible; it can be retried. */\n | {\n tag: \"OperationInaccessible\";\n value: {\n operationId: string;\n };\n}\n/** The operation failed with an error. */\n | {\n tag: \"OperationError\";\n value: {\n operationId: string;\n error: string;\n };\n}\n/** The subscription was stopped by the host and is no longer valid. */\n | {\n tag: \"Stop\";\n value?: undefined;\n};\nexport const RemoteChainHeadFollowItem: Codec;\n/** Request to start a chain-head follow subscription. */\nexport interface RemoteChainHeadFollowRequest {\n /** Chain genesis hash. */\n genesisHash: HexString;\n /** Whether to include runtime information in events. */\n withRuntime: boolean;\n}\nexport const RemoteChainHeadFollowRequest: Codec;\n/** Request to fetch the header of a pinned block. */\nexport interface RemoteChainHeadHeaderRequest {\n /** Chain genesis hash. */\n genesisHash: HexString;\n /** Follow subscription identifier. */\n followSubscriptionId: string;\n /** Block hash. */\n hash: HexString;\n}\nexport const RemoteChainHeadHeaderRequest: Codec;\n/** Response containing the requested block header. */\nexport interface RemoteChainHeadHeaderResponse {\n /** SCALE-encoded block header. */\n header?: HexString;\n}\nexport const RemoteChainHeadHeaderResponse: Codec;\n/** Request to stop an in-progress chain-head operation. */\nexport interface RemoteChainHeadStopOperationRequest {\n /** Chain genesis hash. */\n genesisHash: HexString;\n /** Follow subscription identifier. */\n followSubscriptionId: string;\n /** Operation identifier. */\n operationId: string;\n}\nexport const RemoteChainHeadStopOperationRequest: Codec;\n/** Request to query storage at a pinned block. */\nexport interface RemoteChainHeadStorageRequest {\n /** Chain genesis hash. */\n genesisHash: HexString;\n /** Follow subscription identifier. */\n followSubscriptionId: string;\n /** Block hash. */\n hash: HexString;\n /** Storage items to query. */\n items: Array;\n /** Optional child trie. */\n childTrie?: HexString;\n}\nexport const RemoteChainHeadStorageRequest: Codec;\n/** Response to a storage request; results arrive as follow events. */\nexport interface RemoteChainHeadStorageResponse {\n /** Started operation result. */\n operation: OperationStartedResult;\n}\nexport const RemoteChainHeadStorageResponse: Codec;\n/** Request to release pinned blocks. */\nexport interface RemoteChainHeadUnpinRequest {\n /** Chain genesis hash. */\n genesisHash: HexString;\n /** Follow subscription identifier. */\n followSubscriptionId: string;\n /** Block hashes to unpin. */\n hashes: Array;\n}\nexport const RemoteChainHeadUnpinRequest: Codec;\n/** Error from [`crate::api::Chain::get_chain_info`]. */\nexport type RemoteChainInfoError = \n/** The host does not serve the requested chain. */\n{\n tag: \"NotSupported\";\n value?: undefined;\n}\n/** Catch-all. */\n | {\n tag: \"Unknown\";\n value: GenericError;\n};\nexport const RemoteChainInfoError: Codec;\n/** Request to resolve one chain identifier against the host's environment. */\nexport interface RemoteChainInfoRequest {\n /** Chain to resolve. */\n chain: ChainIdentifier;\n}\nexport const RemoteChainInfoRequest: Codec;\n/** Response carrying the resolved chain data. */\nexport interface RemoteChainInfoResponse {\n /** Ecosystem the host is configured for, e.g. \"polkadot\", \"kusama\", \"paseo\". */\n network: string;\n /** Chain this response resolves, echoed from the request. */\n chain: ChainIdentifier;\n /** Genesis hash identifying the chain in all chain-scoped calls. */\n genesisHash: HexString;\n}\nexport const RemoteChainInfoResponse: Codec;\n/** Request for the display name of a chain. */\nexport interface RemoteChainSpecChainNameRequest {\n /** Chain genesis hash. */\n genesisHash: HexString;\n}\nexport const RemoteChainSpecChainNameRequest: Codec;\n/** Response containing the chain display name. */\nexport interface RemoteChainSpecChainNameResponse {\n /** Chain display name. */\n chainName: string;\n}\nexport const RemoteChainSpecChainNameResponse: Codec;\n/** Request for the canonical genesis hash of a chain. */\nexport interface RemoteChainSpecGenesisHashRequest {\n /** Chain genesis hash requested by the product. */\n genesisHash: HexString;\n}\nexport const RemoteChainSpecGenesisHashRequest: Codec;\n/** Response containing the canonical genesis hash. */\nexport interface RemoteChainSpecGenesisHashResponse {\n /** Chain genesis hash. */\n genesisHash: HexString;\n}\nexport const RemoteChainSpecGenesisHashResponse: Codec;\n/** Request for the JSON-encoded properties of a chain. */\nexport interface RemoteChainSpecPropertiesRequest {\n /** Chain genesis hash. */\n genesisHash: HexString;\n}\nexport const RemoteChainSpecPropertiesRequest: Codec;\n/** Response containing the chain properties. */\nexport interface RemoteChainSpecPropertiesResponse {\n /** JSON-encoded properties. */\n properties: string;\n}\nexport const RemoteChainSpecPropertiesResponse: Codec;\n/** Request to broadcast a signed transaction. */\nexport interface RemoteChainTransactionBroadcastRequest {\n /** Chain genesis hash. */\n genesisHash: HexString;\n /** Signed transaction bytes. */\n transaction: HexString;\n}\nexport const RemoteChainTransactionBroadcastRequest: Codec;\n/** Response to a transaction broadcast request. */\nexport interface RemoteChainTransactionBroadcastResponse {\n /** Broadcast operation identifier, if available. */\n operationId?: string;\n}\nexport const RemoteChainTransactionBroadcastResponse: Codec;\n/** Request to stop broadcasting a transaction. */\nexport interface RemoteChainTransactionStopRequest {\n /** Chain genesis hash. */\n genesisHash: HexString;\n /** Operation identifier of the broadcast to stop. */\n operationId: string;\n}\nexport const RemoteChainTransactionStopRequest: Codec;\n/** remote-permission request (RFC 0002). */\nexport interface RemotePermissionRequest {\n /** Permission requested by the product. */\n permission: RemotePermission;\n}\nexport const RemotePermissionRequest: Codec;\n/** Outcome of a remote-permission request. */\nexport interface RemotePermissionResponse {\n /** Whether the permission was granted. */\n granted: boolean;\n}\nexport const RemotePermissionResponse: Codec;\n/** Item containing an optional preimage lookup result. */\nexport interface RemotePreimageLookupSubscribeItem {\n /** Preimage data, if found. */\n value?: HexString;\n}\nexport const RemotePreimageLookupSubscribeItem: Codec;\n/** Request to subscribe to preimage lookup results. */\nexport interface RemotePreimageLookupSubscribeRequest {\n /** Hash of the preimage. */\n key: HexString;\n}\nexport const RemotePreimageLookupSubscribeRequest: Codec;\n/** Statement proof creation error. */\nexport type RemoteStatementStoreCreateProofError = \n/** Signing operation failed. */\n{\n tag: \"UnableToSign\";\n value?: undefined;\n}\n/** Account not recognized. */\n | {\n tag: \"UnknownAccount\";\n value?: undefined;\n}\n/** Catch-all. */\n | {\n tag: \"Unknown\";\n value: {\n reason: string;\n };\n};\nexport const RemoteStatementStoreCreateProofError: Codec;\n/** Request to create a cryptographic proof for a statement. */\nexport interface RemoteStatementStoreCreateProofRequest {\n /** Product account that should create the proof. */\n productAccountId: ProductAccountId;\n /** Statement to prove. */\n statement: Statement;\n}\nexport const RemoteStatementStoreCreateProofRequest: Codec;\n/** Response containing a statement proof. */\nexport interface RemoteStatementStoreCreateProofResponse {\n /** Created statement proof. */\n proof: StatementProof;\n}\nexport const RemoteStatementStoreCreateProofResponse: Codec;\n/**\n * Page of signed statements delivered by the statement store subscription\n * (RFC 0008). The `is_complete` flag distinguishes the historical-dump phase\n * (`false`) from the live-update phase (`true`).\n */\nexport interface RemoteStatementStoreSubscribeItem {\n /** Signed statements matching the subscription. */\n statements: Array;\n /**\n * `false` while the host is still streaming the historical dump (more\n * pages to follow). `true` once the dump is complete; all subsequent\n * pages are also `true` and carry only newly-arrived statements.\n */\n isComplete: boolean;\n}\nexport const RemoteStatementStoreSubscribeItem: Codec;\n/** Request to subscribe to statements via a topic filter (RFC 0008). */\nexport type RemoteStatementStoreSubscribeRequest = \n/** AND: statement must contain every listed topic. */\n{\n tag: \"MatchAll\";\n value: Array;\n}\n/** OR: statement must contain at least one listed topic. */\n | {\n tag: \"MatchAny\";\n value: Array;\n};\nexport const RemoteStatementStoreSubscribeRequest: Codec;\n/** Local storage read failure. */\nexport type HostLocalStorageReadError = \n/** Storage quota exceeded. */\n{\n tag: \"Full\";\n value?: undefined;\n}\n/**\n * The addressed storage belongs to another product that has not granted\n * this caller the `storage` scope.\n *\n * One variant answers every reason: the product does not resolve, it\n * published no manifest, or its manifest grants this caller nothing.\n * Distinguishing them would make the call a probe for which products exist\n * and which hold data.\n */\n | {\n tag: \"AccessNotGranted\";\n value?: undefined;\n}\n/** Catch-all. */\n | {\n tag: \"Unknown\";\n value: {\n reason: string;\n };\n};\nexport const HostLocalStorageReadError: Codec;\n/**\n * Request to read a local storage value.\n *\n * Storage is private by default: `product: None` addresses the caller's own\n * storage, which is what every v0.1 read resolved to. Naming another product\n * reads that product's storage instead, and succeeds only if that product's\n * manifest grants this caller the `storage` scope.\n */\nexport interface HostLocalStorageReadRequest {\n /**\n * Product whose storage is read. `None`, or the caller's own id, means the\n * caller, and consults no grant.\n */\n product?: string;\n /** Storage key to read. */\n key: string;\n}\nexport const HostLocalStorageReadRequest: Codec;\n/** Convert UTC instants using a snapshot of the host's locale subscription. */\nexport interface HostLocaleLocalizeTimestampsRequest {\n /** At most 128 Unix millisecond instants, no later than year 9999. */\n timestampsMs: Array;\n /** Language tag from the locale subscription, not a guessed language. */\n languageTag: string;\n /** Time zone from the locale subscription; evaluated separately at each instant. */\n timeZone: string;\n}\nexport const HostLocaleLocalizeTimestampsRequest: Codec;\n/** Local timestamps in exactly the request's order. */\nexport interface HostLocaleLocalizeTimestampsResponse {\n /** One result per requested timestamp; partial success is not returned. */\n timestamps: Array;\n}\nexport const HostLocaleLocalizeTimestampsResponse: Codec;\n/** Host language and local time zone, replaced together when either changes. */\nexport interface HostLocaleSubscribeItem {\n /** BCP 47 language tag selected by the host. */\n languageTag: string;\n /** IANA time zone, or absent when the host cannot supply local time. */\n timeZone?: string;\n}\nexport const HostLocaleSubscribeItem: Codec;\n/** Cross-axis alignment of `Row` children. */\nexport type VerticalAlignment = \"Top\" | \"Center\" | \"Bottom\";\nexport const VerticalAlignment: Codec;\n/** An sr25519 (schnorrkel) VRF signature: the VRF pre-output and its proof. */\nexport interface VrfSignature {\n /** schnorrkel `VRFPreOut` \u2014 the 32-byte VRF output point. */\n preOutput: HexString;\n /** schnorrkel `VRFProof` \u2014 the 64-byte DLEQ proof. */\n proof: HexString;\n}\nexport const VrfSignature: Codec;\n/** One `append_message` call replayed against the signing transcript. */\nexport interface VrfTranscriptItem {\n /** Merlin `append_message` label. */\n label: HexString;\n /** Merlin `append_message` value. */\n value: HexString;\n}\nexport const VrfTranscriptItem: Codec;\n\n}\n\n\n// re-export namespace T at module top level (mirrors index.d.ts `export *`)\n\nexport import ActionTrigger = T.ActionTrigger;\nexport import AllocatableResource = T.AllocatableResource;\nexport import AllocationOutcome = T.AllocationOutcome;\nexport import Arrangement = T.Arrangement;\nexport import Background = T.Background;\nexport import BlendingMode = T.BlendingMode;\nexport import BorderStyle = T.BorderStyle;\nexport import BoxProps = T.BoxProps;\nexport import ButtonProps = T.ButtonProps;\nexport import ButtonVariant = T.ButtonVariant;\nexport import Bytes32 = T.Bytes32;\nexport import ChainIdentifier = T.ChainIdentifier;\nexport import ChatAction = T.ChatAction;\nexport import ChatActionLayout = T.ChatActionLayout;\nexport import ChatActionPayload = T.ChatActionPayload;\nexport import ChatActions = T.ChatActions;\nexport import ChatBotRegistrationStatus = T.ChatBotRegistrationStatus;\nexport import ChatCommand = T.ChatCommand;\nexport import ChatCustomMessage = T.ChatCustomMessage;\nexport import ChatFile = T.ChatFile;\nexport import ChatMedia = T.ChatMedia;\nexport import ChatMessageContent = T.ChatMessageContent;\nexport import ChatReaction = T.ChatReaction;\nexport import ChatRichText = T.ChatRichText;\nexport import ChatRoom = T.ChatRoom;\nexport import ChatRoomParticipation = T.ChatRoomParticipation;\nexport import ChatRoomRegistrationStatus = T.ChatRoomRegistrationStatus;\nexport import CoinPaymentCheque = T.CoinPaymentCheque;\nexport import CoinPaymentClearingReference = T.CoinPaymentClearingReference;\nexport import CoinPaymentError = T.CoinPaymentError;\nexport import CoinPaymentPurseInfo = T.CoinPaymentPurseInfo;\nexport import CoinPaymentStatus = T.CoinPaymentStatus;\nexport import CoinPaymentTransmissionChannel = T.CoinPaymentTransmissionChannel;\nexport import ColorToken = T.ColorToken;\nexport import ColumnProps = T.ColumnProps;\nexport import ContactHandle = T.ContactHandle;\nexport import ContactPickOutcome = T.ContactPickOutcome;\nexport import ContentAlignment = T.ContentAlignment;\nexport import ContextualAlias = T.ContextualAlias;\nexport import DerivationIndex = T.DerivationIndex;\nexport import Dimensions = T.Dimensions;\nexport import Effect = T.Effect;\nexport import EffectProps = T.EffectProps;\nexport import GenericError = T.GenericError;\nexport import HorizontalAlignment = T.HorizontalAlignment;\nexport import VersionedHostAccountConnectionStatusSubscribeError = T.VersionedHostAccountConnectionStatusSubscribeError;\nexport import VersionedHostAccountConnectionStatusSubscribeItem = T.VersionedHostAccountConnectionStatusSubscribeItem;\nexport import VersionedHostAccountConnectionStatusSubscribeRequest = T.VersionedHostAccountConnectionStatusSubscribeRequest;\nexport import VersionedHostAccountCreateProofError = T.VersionedHostAccountCreateProofError;\nexport import VersionedHostAccountCreateProofRequest = T.VersionedHostAccountCreateProofRequest;\nexport import VersionedHostAccountCreateProofResponse = T.VersionedHostAccountCreateProofResponse;\nexport import VersionedHostAccountGetAliasError = T.VersionedHostAccountGetAliasError;\nexport import VersionedHostAccountGetAliasRequest = T.VersionedHostAccountGetAliasRequest;\nexport import VersionedHostAccountGetAliasResponse = T.VersionedHostAccountGetAliasResponse;\nexport import VersionedHostAccountGetError = T.VersionedHostAccountGetError;\nexport import VersionedHostAccountGetRequest = T.VersionedHostAccountGetRequest;\nexport import VersionedHostAccountGetResponse = T.VersionedHostAccountGetResponse;\nexport import VersionedHostAccountListRingVrfKeysError = T.VersionedHostAccountListRingVrfKeysError;\nexport import VersionedHostAccountListRingVrfKeysRequest = T.VersionedHostAccountListRingVrfKeysRequest;\nexport import VersionedHostAccountListRingVrfKeysResponse = T.VersionedHostAccountListRingVrfKeysResponse;\nexport import VersionedHostAccountRegisterRingVrfKeyError = T.VersionedHostAccountRegisterRingVrfKeyError;\nexport import VersionedHostAccountRegisterRingVrfKeyRequest = T.VersionedHostAccountRegisterRingVrfKeyRequest;\nexport import VersionedHostAccountRegisterRingVrfKeyResponse = T.VersionedHostAccountRegisterRingVrfKeyResponse;\nexport import VersionedHostAccountRingVrfSignError = T.VersionedHostAccountRingVrfSignError;\nexport import VersionedHostAccountRingVrfSignRequest = T.VersionedHostAccountRingVrfSignRequest;\nexport import VersionedHostAccountRingVrfSignResponse = T.VersionedHostAccountRingVrfSignResponse;\nexport import VersionedHostAccountSignVrfError = T.VersionedHostAccountSignVrfError;\nexport import VersionedHostAccountSignVrfRequest = T.VersionedHostAccountSignVrfRequest;\nexport import VersionedHostAccountSignVrfResponse = T.VersionedHostAccountSignVrfResponse;\nexport import VersionedHostChatActionSubscribeError = T.VersionedHostChatActionSubscribeError;\nexport import VersionedHostChatActionSubscribeItem = T.VersionedHostChatActionSubscribeItem;\nexport import VersionedHostChatActionSubscribeRequest = T.VersionedHostChatActionSubscribeRequest;\nexport import VersionedHostChatCreateRoomError = T.VersionedHostChatCreateRoomError;\nexport import VersionedHostChatCreateRoomRequest = T.VersionedHostChatCreateRoomRequest;\nexport import VersionedHostChatCreateRoomResponse = T.VersionedHostChatCreateRoomResponse;\nexport import VersionedHostChatListSubscribeError = T.VersionedHostChatListSubscribeError;\nexport import VersionedHostChatListSubscribeItem = T.VersionedHostChatListSubscribeItem;\nexport import VersionedHostChatListSubscribeRequest = T.VersionedHostChatListSubscribeRequest;\nexport import VersionedHostChatPostMessageError = T.VersionedHostChatPostMessageError;\nexport import VersionedHostChatPostMessageRequest = T.VersionedHostChatPostMessageRequest;\nexport import VersionedHostChatPostMessageResponse = T.VersionedHostChatPostMessageResponse;\nexport import VersionedHostChatRegisterBotError = T.VersionedHostChatRegisterBotError;\nexport import VersionedHostChatRegisterBotRequest = T.VersionedHostChatRegisterBotRequest;\nexport import VersionedHostChatRegisterBotResponse = T.VersionedHostChatRegisterBotResponse;\nexport import VersionedHostCoinPaymentCreateChequeError = T.VersionedHostCoinPaymentCreateChequeError;\nexport import VersionedHostCoinPaymentCreateChequeRequest = T.VersionedHostCoinPaymentCreateChequeRequest;\nexport import VersionedHostCoinPaymentCreateChequeResponse = T.VersionedHostCoinPaymentCreateChequeResponse;\nexport import VersionedHostCoinPaymentCreatePurseError = T.VersionedHostCoinPaymentCreatePurseError;\nexport import VersionedHostCoinPaymentCreatePurseRequest = T.VersionedHostCoinPaymentCreatePurseRequest;\nexport import VersionedHostCoinPaymentCreatePurseResponse = T.VersionedHostCoinPaymentCreatePurseResponse;\nexport import VersionedHostCoinPaymentCreateReceivableError = T.VersionedHostCoinPaymentCreateReceivableError;\nexport import VersionedHostCoinPaymentCreateReceivableRequest = T.VersionedHostCoinPaymentCreateReceivableRequest;\nexport import VersionedHostCoinPaymentCreateReceivableResponse = T.VersionedHostCoinPaymentCreateReceivableResponse;\nexport import VersionedHostCoinPaymentDeletePurseError = T.VersionedHostCoinPaymentDeletePurseError;\nexport import VersionedHostCoinPaymentDeletePurseItem = T.VersionedHostCoinPaymentDeletePurseItem;\nexport import VersionedHostCoinPaymentDeletePurseRequest = T.VersionedHostCoinPaymentDeletePurseRequest;\nexport import VersionedHostCoinPaymentDepositError = T.VersionedHostCoinPaymentDepositError;\nexport import VersionedHostCoinPaymentDepositItem = T.VersionedHostCoinPaymentDepositItem;\nexport import VersionedHostCoinPaymentDepositRequest = T.VersionedHostCoinPaymentDepositRequest;\nexport import VersionedHostCoinPaymentListenForError = T.VersionedHostCoinPaymentListenForError;\nexport import VersionedHostCoinPaymentListenForItem = T.VersionedHostCoinPaymentListenForItem;\nexport import VersionedHostCoinPaymentListenForRequest = T.VersionedHostCoinPaymentListenForRequest;\nexport import VersionedHostCoinPaymentQueryPurseError = T.VersionedHostCoinPaymentQueryPurseError;\nexport import VersionedHostCoinPaymentQueryPurseRequest = T.VersionedHostCoinPaymentQueryPurseRequest;\nexport import VersionedHostCoinPaymentQueryPurseResponse = T.VersionedHostCoinPaymentQueryPurseResponse;\nexport import VersionedHostCoinPaymentRebalancePurseError = T.VersionedHostCoinPaymentRebalancePurseError;\nexport import VersionedHostCoinPaymentRebalancePurseItem = T.VersionedHostCoinPaymentRebalancePurseItem;\nexport import VersionedHostCoinPaymentRebalancePurseRequest = T.VersionedHostCoinPaymentRebalancePurseRequest;\nexport import VersionedHostCoinPaymentRefundError = T.VersionedHostCoinPaymentRefundError;\nexport import VersionedHostCoinPaymentRefundItem = T.VersionedHostCoinPaymentRefundItem;\nexport import VersionedHostCoinPaymentRefundRequest = T.VersionedHostCoinPaymentRefundRequest;\nexport import VersionedHostContactsPickError = T.VersionedHostContactsPickError;\nexport import VersionedHostContactsPickRequest = T.VersionedHostContactsPickRequest;\nexport import VersionedHostContactsPickResponse = T.VersionedHostContactsPickResponse;\nexport import VersionedHostCreateTransactionError = T.VersionedHostCreateTransactionError;\nexport import VersionedHostCreateTransactionRequest = T.VersionedHostCreateTransactionRequest;\nexport import VersionedHostCreateTransactionResponse = T.VersionedHostCreateTransactionResponse;\nexport import VersionedHostCreateTransactionWithLegacyAccountError = T.VersionedHostCreateTransactionWithLegacyAccountError;\nexport import VersionedHostCreateTransactionWithLegacyAccountRequest = T.VersionedHostCreateTransactionWithLegacyAccountRequest;\nexport import VersionedHostCreateTransactionWithLegacyAccountResponse = T.VersionedHostCreateTransactionWithLegacyAccountResponse;\nexport import VersionedHostDeriveEntropyError = T.VersionedHostDeriveEntropyError;\nexport import VersionedHostDeriveEntropyRequest = T.VersionedHostDeriveEntropyRequest;\nexport import VersionedHostDeriveEntropyResponse = T.VersionedHostDeriveEntropyResponse;\nexport import VersionedHostDevicePermissionError = T.VersionedHostDevicePermissionError;\nexport import VersionedHostDevicePermissionRequest = T.VersionedHostDevicePermissionRequest;\nexport import VersionedHostDevicePermissionResponse = T.VersionedHostDevicePermissionResponse;\nexport import VersionedHostFeatureSupportedError = T.VersionedHostFeatureSupportedError;\nexport import VersionedHostFeatureSupportedRequest = T.VersionedHostFeatureSupportedRequest;\nexport import VersionedHostFeatureSupportedResponse = T.VersionedHostFeatureSupportedResponse;\nexport import VersionedHostGetLegacyAccountsError = T.VersionedHostGetLegacyAccountsError;\nexport import VersionedHostGetLegacyAccountsRequest = T.VersionedHostGetLegacyAccountsRequest;\nexport import VersionedHostGetLegacyAccountsResponse = T.VersionedHostGetLegacyAccountsResponse;\nexport import VersionedHostGetProductContextError = T.VersionedHostGetProductContextError;\nexport import VersionedHostGetProductContextRequest = T.VersionedHostGetProductContextRequest;\nexport import VersionedHostGetProductContextResponse = T.VersionedHostGetProductContextResponse;\nexport import VersionedHostGetUserIdError = T.VersionedHostGetUserIdError;\nexport import VersionedHostGetUserIdRequest = T.VersionedHostGetUserIdRequest;\nexport import VersionedHostGetUserIdResponse = T.VersionedHostGetUserIdResponse;\nexport import VersionedHostHandshakeError = T.VersionedHostHandshakeError;\nexport import VersionedHostHandshakeRequest = T.VersionedHostHandshakeRequest;\nexport import VersionedHostHandshakeResponse = T.VersionedHostHandshakeResponse;\nexport import HostInfo = T.HostInfo;\nexport import VersionedHostInfoError = T.VersionedHostInfoError;\nexport import VersionedHostInfoRequest = T.VersionedHostInfoRequest;\nexport import VersionedHostInfoResponse = T.VersionedHostInfoResponse;\nexport import VersionedHostJamPeerTransportCloseError = T.VersionedHostJamPeerTransportCloseError;\nexport import VersionedHostJamPeerTransportCloseRequest = T.VersionedHostJamPeerTransportCloseRequest;\nexport import VersionedHostJamPeerTransportCloseResponse = T.VersionedHostJamPeerTransportCloseResponse;\nexport import VersionedHostJamPeerTransportDialError = T.VersionedHostJamPeerTransportDialError;\nexport import VersionedHostJamPeerTransportDialRequest = T.VersionedHostJamPeerTransportDialRequest;\nexport import VersionedHostJamPeerTransportDialResponse = T.VersionedHostJamPeerTransportDialResponse;\nexport import VersionedHostJamPeerTransportEventsError = T.VersionedHostJamPeerTransportEventsError;\nexport import VersionedHostJamPeerTransportEventsRequest = T.VersionedHostJamPeerTransportEventsRequest;\nexport import VersionedHostJamPeerTransportEventsResponse = T.VersionedHostJamPeerTransportEventsResponse;\nexport import VersionedHostJamPeerTransportOpenError = T.VersionedHostJamPeerTransportOpenError;\nexport import VersionedHostJamPeerTransportOpenRequest = T.VersionedHostJamPeerTransportOpenRequest;\nexport import VersionedHostJamPeerTransportOpenResponse = T.VersionedHostJamPeerTransportOpenResponse;\nexport import VersionedHostJamPeerTransportRecvError = T.VersionedHostJamPeerTransportRecvError;\nexport import VersionedHostJamPeerTransportRecvRequest = T.VersionedHostJamPeerTransportRecvRequest;\nexport import VersionedHostJamPeerTransportRecvResponse = T.VersionedHostJamPeerTransportRecvResponse;\nexport import VersionedHostJamPeerTransportResetError = T.VersionedHostJamPeerTransportResetError;\nexport import VersionedHostJamPeerTransportResetRequest = T.VersionedHostJamPeerTransportResetRequest;\nexport import VersionedHostJamPeerTransportResetResponse = T.VersionedHostJamPeerTransportResetResponse;\nexport import VersionedHostJamPeerTransportSendError = T.VersionedHostJamPeerTransportSendError;\nexport import VersionedHostJamPeerTransportSendRequest = T.VersionedHostJamPeerTransportSendRequest;\nexport import VersionedHostJamPeerTransportSendResponse = T.VersionedHostJamPeerTransportSendResponse;\nexport import VersionedHostLocalStorageChangeItem = T.VersionedHostLocalStorageChangeItem;\nexport import VersionedHostLocalStorageClearError = T.VersionedHostLocalStorageClearError;\nexport import VersionedHostLocalStorageClearRequest = T.VersionedHostLocalStorageClearRequest;\nexport import VersionedHostLocalStorageClearResponse = T.VersionedHostLocalStorageClearResponse;\nexport import VersionedHostLocalStorageReadError = T.VersionedHostLocalStorageReadError;\nexport import VersionedHostLocalStorageReadRequest = T.VersionedHostLocalStorageReadRequest;\nexport import VersionedHostLocalStorageReadResponse = T.VersionedHostLocalStorageReadResponse;\nexport import VersionedHostLocalStorageSubscribeError = T.VersionedHostLocalStorageSubscribeError;\nexport import VersionedHostLocalStorageSubscribeRequest = T.VersionedHostLocalStorageSubscribeRequest;\nexport import VersionedHostLocalStorageWriteError = T.VersionedHostLocalStorageWriteError;\nexport import VersionedHostLocalStorageWriteRequest = T.VersionedHostLocalStorageWriteRequest;\nexport import VersionedHostLocalStorageWriteResponse = T.VersionedHostLocalStorageWriteResponse;\nexport import VersionedHostLocaleLocalizeTimestampsError = T.VersionedHostLocaleLocalizeTimestampsError;\nexport import VersionedHostLocaleLocalizeTimestampsRequest = T.VersionedHostLocaleLocalizeTimestampsRequest;\nexport import VersionedHostLocaleLocalizeTimestampsResponse = T.VersionedHostLocaleLocalizeTimestampsResponse;\nexport import HostLocaleLocalizedTimestamp = T.HostLocaleLocalizedTimestamp;\nexport import VersionedHostLocaleSubscribeError = T.VersionedHostLocaleSubscribeError;\nexport import VersionedHostLocaleSubscribeItem = T.VersionedHostLocaleSubscribeItem;\nexport import VersionedHostLocaleSubscribeRequest = T.VersionedHostLocaleSubscribeRequest;\nexport import VersionedHostNavigateToError = T.VersionedHostNavigateToError;\nexport import VersionedHostNavigateToRequest = T.VersionedHostNavigateToRequest;\nexport import VersionedHostNavigateToResponse = T.VersionedHostNavigateToResponse;\nexport import VersionedHostPaymentBalanceSubscribeError = T.VersionedHostPaymentBalanceSubscribeError;\nexport import VersionedHostPaymentBalanceSubscribeItem = T.VersionedHostPaymentBalanceSubscribeItem;\nexport import VersionedHostPaymentBalanceSubscribeRequest = T.VersionedHostPaymentBalanceSubscribeRequest;\nexport import VersionedHostPaymentError = T.VersionedHostPaymentError;\nexport import VersionedHostPaymentRequest = T.VersionedHostPaymentRequest;\nexport import VersionedHostPaymentResponse = T.VersionedHostPaymentResponse;\nexport import VersionedHostPaymentStatusSubscribeError = T.VersionedHostPaymentStatusSubscribeError;\nexport import VersionedHostPaymentStatusSubscribeItem = T.VersionedHostPaymentStatusSubscribeItem;\nexport import VersionedHostPaymentStatusSubscribeRequest = T.VersionedHostPaymentStatusSubscribeRequest;\nexport import VersionedHostPaymentTopUpError = T.VersionedHostPaymentTopUpError;\nexport import VersionedHostPaymentTopUpRequest = T.VersionedHostPaymentTopUpRequest;\nexport import VersionedHostPaymentTopUpResponse = T.VersionedHostPaymentTopUpResponse;\nexport import HostPlatform = T.HostPlatform;\nexport import VersionedHostPocketListSubscribeError = T.VersionedHostPocketListSubscribeError;\nexport import VersionedHostPocketListSubscribeItem = T.VersionedHostPocketListSubscribeItem;\nexport import VersionedHostPocketListSubscribeRequest = T.VersionedHostPocketListSubscribeRequest;\nexport import VersionedHostPocketRemoveCardError = T.VersionedHostPocketRemoveCardError;\nexport import VersionedHostPocketRemoveCardRequest = T.VersionedHostPocketRemoveCardRequest;\nexport import VersionedHostPocketRemoveCardResponse = T.VersionedHostPocketRemoveCardResponse;\nexport import VersionedHostPushNotificationCancelError = T.VersionedHostPushNotificationCancelError;\nexport import VersionedHostPushNotificationCancelRequest = T.VersionedHostPushNotificationCancelRequest;\nexport import VersionedHostPushNotificationCancelResponse = T.VersionedHostPushNotificationCancelResponse;\nexport import VersionedHostPushNotificationError = T.VersionedHostPushNotificationError;\nexport import VersionedHostPushNotificationRequest = T.VersionedHostPushNotificationRequest;\nexport import VersionedHostPushNotificationResponse = T.VersionedHostPushNotificationResponse;\nexport import VersionedHostRendererActionSubscribeError = T.VersionedHostRendererActionSubscribeError;\nexport import VersionedHostRendererActionSubscribeItem = T.VersionedHostRendererActionSubscribeItem;\nexport import VersionedHostRendererActionSubscribeRequest = T.VersionedHostRendererActionSubscribeRequest;\nexport import VersionedHostRequestLoginError = T.VersionedHostRequestLoginError;\nexport import VersionedHostRequestLoginRequest = T.VersionedHostRequestLoginRequest;\nexport import VersionedHostRequestLoginResponse = T.VersionedHostRequestLoginResponse;\nexport import VersionedHostRequestResourceAllocationError = T.VersionedHostRequestResourceAllocationError;\nexport import VersionedHostRequestResourceAllocationRequest = T.VersionedHostRequestResourceAllocationRequest;\nexport import VersionedHostRequestResourceAllocationResponse = T.VersionedHostRequestResourceAllocationResponse;\nexport import HostSignPayloadData = T.HostSignPayloadData;\nexport import VersionedHostSignPayloadError = T.VersionedHostSignPayloadError;\nexport import VersionedHostSignPayloadRequest = T.VersionedHostSignPayloadRequest;\nexport import VersionedHostSignPayloadResponse = T.VersionedHostSignPayloadResponse;\nexport import VersionedHostSignPayloadWithLegacyAccountError = T.VersionedHostSignPayloadWithLegacyAccountError;\nexport import VersionedHostSignPayloadWithLegacyAccountRequest = T.VersionedHostSignPayloadWithLegacyAccountRequest;\nexport import VersionedHostSignPayloadWithLegacyAccountResponse = T.VersionedHostSignPayloadWithLegacyAccountResponse;\nexport import VersionedHostSignRawError = T.VersionedHostSignRawError;\nexport import VersionedHostSignRawRequest = T.VersionedHostSignRawRequest;\nexport import VersionedHostSignRawResponse = T.VersionedHostSignRawResponse;\nexport import VersionedHostSignRawWithLegacyAccountError = T.VersionedHostSignRawWithLegacyAccountError;\nexport import VersionedHostSignRawWithLegacyAccountRequest = T.VersionedHostSignRawWithLegacyAccountRequest;\nexport import VersionedHostSignRawWithLegacyAccountResponse = T.VersionedHostSignRawWithLegacyAccountResponse;\nexport import VersionedHostThemeSubscribeError = T.VersionedHostThemeSubscribeError;\nexport import VersionedHostThemeSubscribeItem = T.VersionedHostThemeSubscribeItem;\nexport import VersionedHostThemeSubscribeRequest = T.VersionedHostThemeSubscribeRequest;\nexport import VersionedHostWorkerBeginOperationError = T.VersionedHostWorkerBeginOperationError;\nexport import VersionedHostWorkerBeginOperationRequest = T.VersionedHostWorkerBeginOperationRequest;\nexport import VersionedHostWorkerBeginOperationResponse = T.VersionedHostWorkerBeginOperationResponse;\nexport import VersionedHostWorkerEndOperationError = T.VersionedHostWorkerEndOperationError;\nexport import VersionedHostWorkerEndOperationRequest = T.VersionedHostWorkerEndOperationRequest;\nexport import VersionedHostWorkerEndOperationResponse = T.VersionedHostWorkerEndOperationResponse;\nexport import HostWorkerOperationError = T.HostWorkerOperationError;\nexport import ImageFit = T.ImageFit;\nexport import ImageProps = T.ImageProps;\nexport import ImageSource = T.ImageSource;\nexport import JamPeerTransportEvent = T.JamPeerTransportEvent;\nexport import LegacyAccount = T.LegacyAccount;\nexport import LegacyAccountTxPayload = T.LegacyAccountTxPayload;\nexport import Modifier = T.Modifier;\nexport import OperationStartedResult = T.OperationStartedResult;\nexport import PaymentTopUpSource = T.PaymentTopUpSource;\nexport import PocketCard = T.PocketCard;\nexport import PreimageSubmitError = T.PreimageSubmitError;\nexport import ProductAccount = T.ProductAccount;\nexport import ProductAccountId = T.ProductAccountId;\nexport import ProductAccountTxPayload = T.ProductAccountTxPayload;\nexport import ProductProofContext = T.ProductProofContext;\nexport import VersionedProductRendererRenderError = T.VersionedProductRendererRenderError;\nexport import VersionedProductRendererRenderItem = T.VersionedProductRendererRenderItem;\nexport import VersionedProductRendererRenderRequest = T.VersionedProductRendererRenderRequest;\nexport import RawPayload = T.RawPayload;\nexport import RegisteredRingVrfKey = T.RegisteredRingVrfKey;\nexport import VersionedRemoteChainHeadBodyError = T.VersionedRemoteChainHeadBodyError;\nexport import VersionedRemoteChainHeadBodyRequest = T.VersionedRemoteChainHeadBodyRequest;\nexport import VersionedRemoteChainHeadBodyResponse = T.VersionedRemoteChainHeadBodyResponse;\nexport import VersionedRemoteChainHeadCallError = T.VersionedRemoteChainHeadCallError;\nexport import VersionedRemoteChainHeadCallRequest = T.VersionedRemoteChainHeadCallRequest;\nexport import VersionedRemoteChainHeadCallResponse = T.VersionedRemoteChainHeadCallResponse;\nexport import VersionedRemoteChainHeadContinueError = T.VersionedRemoteChainHeadContinueError;\nexport import VersionedRemoteChainHeadContinueRequest = T.VersionedRemoteChainHeadContinueRequest;\nexport import VersionedRemoteChainHeadContinueResponse = T.VersionedRemoteChainHeadContinueResponse;\nexport import VersionedRemoteChainHeadFollowError = T.VersionedRemoteChainHeadFollowError;\nexport import VersionedRemoteChainHeadFollowItem = T.VersionedRemoteChainHeadFollowItem;\nexport import VersionedRemoteChainHeadFollowRequest = T.VersionedRemoteChainHeadFollowRequest;\nexport import VersionedRemoteChainHeadHeaderError = T.VersionedRemoteChainHeadHeaderError;\nexport import VersionedRemoteChainHeadHeaderRequest = T.VersionedRemoteChainHeadHeaderRequest;\nexport import VersionedRemoteChainHeadHeaderResponse = T.VersionedRemoteChainHeadHeaderResponse;\nexport import VersionedRemoteChainHeadStopOperationError = T.VersionedRemoteChainHeadStopOperationError;\nexport import VersionedRemoteChainHeadStopOperationRequest = T.VersionedRemoteChainHeadStopOperationRequest;\nexport import VersionedRemoteChainHeadStopOperationResponse = T.VersionedRemoteChainHeadStopOperationResponse;\nexport import VersionedRemoteChainHeadStorageError = T.VersionedRemoteChainHeadStorageError;\nexport import VersionedRemoteChainHeadStorageRequest = T.VersionedRemoteChainHeadStorageRequest;\nexport import VersionedRemoteChainHeadStorageResponse = T.VersionedRemoteChainHeadStorageResponse;\nexport import VersionedRemoteChainHeadUnpinError = T.VersionedRemoteChainHeadUnpinError;\nexport import VersionedRemoteChainHeadUnpinRequest = T.VersionedRemoteChainHeadUnpinRequest;\nexport import VersionedRemoteChainHeadUnpinResponse = T.VersionedRemoteChainHeadUnpinResponse;\nexport import VersionedRemoteChainInfoError = T.VersionedRemoteChainInfoError;\nexport import VersionedRemoteChainInfoRequest = T.VersionedRemoteChainInfoRequest;\nexport import VersionedRemoteChainInfoResponse = T.VersionedRemoteChainInfoResponse;\nexport import VersionedRemoteChainSpecChainNameError = T.VersionedRemoteChainSpecChainNameError;\nexport import VersionedRemoteChainSpecChainNameRequest = T.VersionedRemoteChainSpecChainNameRequest;\nexport import VersionedRemoteChainSpecChainNameResponse = T.VersionedRemoteChainSpecChainNameResponse;\nexport import VersionedRemoteChainSpecGenesisHashError = T.VersionedRemoteChainSpecGenesisHashError;\nexport import VersionedRemoteChainSpecGenesisHashRequest = T.VersionedRemoteChainSpecGenesisHashRequest;\nexport import VersionedRemoteChainSpecGenesisHashResponse = T.VersionedRemoteChainSpecGenesisHashResponse;\nexport import VersionedRemoteChainSpecPropertiesError = T.VersionedRemoteChainSpecPropertiesError;\nexport import VersionedRemoteChainSpecPropertiesRequest = T.VersionedRemoteChainSpecPropertiesRequest;\nexport import VersionedRemoteChainSpecPropertiesResponse = T.VersionedRemoteChainSpecPropertiesResponse;\nexport import VersionedRemoteChainTransactionBroadcastError = T.VersionedRemoteChainTransactionBroadcastError;\nexport import VersionedRemoteChainTransactionBroadcastRequest = T.VersionedRemoteChainTransactionBroadcastRequest;\nexport import VersionedRemoteChainTransactionBroadcastResponse = T.VersionedRemoteChainTransactionBroadcastResponse;\nexport import VersionedRemoteChainTransactionStopError = T.VersionedRemoteChainTransactionStopError;\nexport import VersionedRemoteChainTransactionStopRequest = T.VersionedRemoteChainTransactionStopRequest;\nexport import VersionedRemoteChainTransactionStopResponse = T.VersionedRemoteChainTransactionStopResponse;\nexport import RemotePermission = T.RemotePermission;\nexport import VersionedRemotePermissionError = T.VersionedRemotePermissionError;\nexport import VersionedRemotePermissionRequest = T.VersionedRemotePermissionRequest;\nexport import VersionedRemotePermissionResponse = T.VersionedRemotePermissionResponse;\nexport import VersionedRemotePreimageLookupSubscribeError = T.VersionedRemotePreimageLookupSubscribeError;\nexport import VersionedRemotePreimageLookupSubscribeItem = T.VersionedRemotePreimageLookupSubscribeItem;\nexport import VersionedRemotePreimageLookupSubscribeRequest = T.VersionedRemotePreimageLookupSubscribeRequest;\nexport import VersionedRemotePreimageSubmitError = T.VersionedRemotePreimageSubmitError;\nexport import VersionedRemotePreimageSubmitRequest = T.VersionedRemotePreimageSubmitRequest;\nexport import VersionedRemotePreimageSubmitResponse = T.VersionedRemotePreimageSubmitResponse;\nexport import VersionedRemoteStatementStoreCreateProofAuthorizedError = T.VersionedRemoteStatementStoreCreateProofAuthorizedError;\nexport import VersionedRemoteStatementStoreCreateProofAuthorizedRequest = T.VersionedRemoteStatementStoreCreateProofAuthorizedRequest;\nexport import VersionedRemoteStatementStoreCreateProofAuthorizedResponse = T.VersionedRemoteStatementStoreCreateProofAuthorizedResponse;\nexport import VersionedRemoteStatementStoreCreateProofError = T.VersionedRemoteStatementStoreCreateProofError;\nexport import VersionedRemoteStatementStoreCreateProofRequest = T.VersionedRemoteStatementStoreCreateProofRequest;\nexport import VersionedRemoteStatementStoreCreateProofResponse = T.VersionedRemoteStatementStoreCreateProofResponse;\nexport import VersionedRemoteStatementStoreSubmitError = T.VersionedRemoteStatementStoreSubmitError;\nexport import VersionedRemoteStatementStoreSubmitRequest = T.VersionedRemoteStatementStoreSubmitRequest;\nexport import VersionedRemoteStatementStoreSubmitResponse = T.VersionedRemoteStatementStoreSubmitResponse;\nexport import VersionedRemoteStatementStoreSubscribeError = T.VersionedRemoteStatementStoreSubscribeError;\nexport import VersionedRemoteStatementStoreSubscribeItem = T.VersionedRemoteStatementStoreSubscribeItem;\nexport import VersionedRemoteStatementStoreSubscribeRequest = T.VersionedRemoteStatementStoreSubscribeRequest;\nexport import RenderContext = T.RenderContext;\nexport import RendererNode = T.RendererNode;\nexport import ResourceAllocationError = T.ResourceAllocationError;\nexport import RingLocation = T.RingLocation;\nexport import RingLocationJunction = T.RingLocationJunction;\nexport import RingVrfKeyDisclosure = T.RingVrfKeyDisclosure;\nexport import RowProps = T.RowProps;\nexport import RuntimeApi = T.RuntimeApi;\nexport import RuntimeSpec = T.RuntimeSpec;\nexport import RuntimeType = T.RuntimeType;\nexport import Shape = T.Shape;\nexport import SignedStatement = T.SignedStatement;\nexport import Size = T.Size;\nexport import Statement = T.Statement;\nexport import StatementProof = T.StatementProof;\nexport import StorageQueryItem = T.StorageQueryItem;\nexport import StorageQueryType = T.StorageQueryType;\nexport import StorageResultItem = T.StorageResultItem;\nexport import TextFieldProps = T.TextFieldProps;\nexport import TextProps = T.TextProps;\nexport import ThemeName = T.ThemeName;\nexport import ThemeVariant = T.ThemeVariant;\nexport import TxPayloadExtension = T.TxPayloadExtension;\nexport import TypographyStyle = T.TypographyStyle;\nexport import HostAccountConnectionStatusSubscribeItem = T.HostAccountConnectionStatusSubscribeItem;\nexport import HostAccountCreateProofError = T.HostAccountCreateProofError;\nexport import HostAccountCreateProofRequest = T.HostAccountCreateProofRequest;\nexport import HostAccountCreateProofResponse = T.HostAccountCreateProofResponse;\nexport import HostAccountGetAliasError = T.HostAccountGetAliasError;\nexport import HostAccountGetAliasRequest = T.HostAccountGetAliasRequest;\nexport import HostAccountGetError = T.HostAccountGetError;\nexport import HostAccountGetRequest = T.HostAccountGetRequest;\nexport import HostAccountGetResponse = T.HostAccountGetResponse;\nexport import HostAccountListRingVrfKeysError = T.HostAccountListRingVrfKeysError;\nexport import HostAccountListRingVrfKeysRequest = T.HostAccountListRingVrfKeysRequest;\nexport import HostAccountRegisterRingVrfKeyError = T.HostAccountRegisterRingVrfKeyError;\nexport import HostAccountRegisterRingVrfKeyRequest = T.HostAccountRegisterRingVrfKeyRequest;\nexport import HostAccountRingVrfSignError = T.HostAccountRingVrfSignError;\nexport import HostAccountRingVrfSignRequest = T.HostAccountRingVrfSignRequest;\nexport import HostAccountSignVrfError = T.HostAccountSignVrfError;\nexport import HostAccountSignVrfRequest = T.HostAccountSignVrfRequest;\nexport import HostChatActionSubscribeItem = T.HostChatActionSubscribeItem;\nexport import HostChatCreateRoomError = T.HostChatCreateRoomError;\nexport import HostChatCreateRoomRequest = T.HostChatCreateRoomRequest;\nexport import HostChatCreateRoomResponse = T.HostChatCreateRoomResponse;\nexport import HostChatListSubscribeItem = T.HostChatListSubscribeItem;\nexport import HostChatPostMessageError = T.HostChatPostMessageError;\nexport import HostChatPostMessageRequest = T.HostChatPostMessageRequest;\nexport import HostChatPostMessageResponse = T.HostChatPostMessageResponse;\nexport import HostChatRegisterBotError = T.HostChatRegisterBotError;\nexport import HostChatRegisterBotRequest = T.HostChatRegisterBotRequest;\nexport import HostChatRegisterBotResponse = T.HostChatRegisterBotResponse;\nexport import HostCoinPaymentCreateChequeRequest = T.HostCoinPaymentCreateChequeRequest;\nexport import HostCoinPaymentCreateChequeResponse = T.HostCoinPaymentCreateChequeResponse;\nexport import HostCoinPaymentCreatePurseRequest = T.HostCoinPaymentCreatePurseRequest;\nexport import HostCoinPaymentCreatePurseResponse = T.HostCoinPaymentCreatePurseResponse;\nexport import HostCoinPaymentCreateReceivableRequest = T.HostCoinPaymentCreateReceivableRequest;\nexport import HostCoinPaymentCreateReceivableResponse = T.HostCoinPaymentCreateReceivableResponse;\nexport import HostCoinPaymentDeletePurseRequest = T.HostCoinPaymentDeletePurseRequest;\nexport import HostCoinPaymentDepositRequest = T.HostCoinPaymentDepositRequest;\nexport import HostCoinPaymentListenForItem = T.HostCoinPaymentListenForItem;\nexport import HostCoinPaymentListenForRequest = T.HostCoinPaymentListenForRequest;\nexport import HostCoinPaymentQueryPurseRequest = T.HostCoinPaymentQueryPurseRequest;\nexport import HostCoinPaymentQueryPurseResponse = T.HostCoinPaymentQueryPurseResponse;\nexport import HostCoinPaymentRebalancePurseRequest = T.HostCoinPaymentRebalancePurseRequest;\nexport import HostCoinPaymentRefundRequest = T.HostCoinPaymentRefundRequest;\nexport import HostContactsPickError = T.HostContactsPickError;\nexport import HostContactsPickRequest = T.HostContactsPickRequest;\nexport import HostContactsPickResponse = T.HostContactsPickResponse;\nexport import HostCreateTransactionError = T.HostCreateTransactionError;\nexport import HostCreateTransactionResponse = T.HostCreateTransactionResponse;\nexport import HostCreateTransactionWithLegacyAccountResponse = T.HostCreateTransactionWithLegacyAccountResponse;\nexport import HostDeriveEntropyError = T.HostDeriveEntropyError;\nexport import HostDeriveEntropyRequest = T.HostDeriveEntropyRequest;\nexport import HostDeriveEntropyResponse = T.HostDeriveEntropyResponse;\nexport import HostDevicePermissionRequest = T.HostDevicePermissionRequest;\nexport import HostDevicePermissionResponse = T.HostDevicePermissionResponse;\nexport import HostFeatureSupportedRequest = T.HostFeatureSupportedRequest;\nexport import HostFeatureSupportedResponse = T.HostFeatureSupportedResponse;\nexport import HostGetLegacyAccountsResponse = T.HostGetLegacyAccountsResponse;\nexport import HostGetProductContextResponse = T.HostGetProductContextResponse;\nexport import HostGetUserIdError = T.HostGetUserIdError;\nexport import HostGetUserIdResponse = T.HostGetUserIdResponse;\nexport import HostHandshakeError = T.HostHandshakeError;\nexport import HostHandshakeRequest = T.HostHandshakeRequest;\nexport import HostJamPeerTransportCloseError = T.HostJamPeerTransportCloseError;\nexport import HostJamPeerTransportCloseRequest = T.HostJamPeerTransportCloseRequest;\nexport import HostJamPeerTransportDialError = T.HostJamPeerTransportDialError;\nexport import HostJamPeerTransportDialRequest = T.HostJamPeerTransportDialRequest;\nexport import HostJamPeerTransportDialResponse = T.HostJamPeerTransportDialResponse;\nexport import HostJamPeerTransportEventsError = T.HostJamPeerTransportEventsError;\nexport import HostJamPeerTransportEventsResponse = T.HostJamPeerTransportEventsResponse;\nexport import HostJamPeerTransportOpenError = T.HostJamPeerTransportOpenError;\nexport import HostJamPeerTransportOpenRequest = T.HostJamPeerTransportOpenRequest;\nexport import HostJamPeerTransportOpenResponse = T.HostJamPeerTransportOpenResponse;\nexport import HostJamPeerTransportRecvError = T.HostJamPeerTransportRecvError;\nexport import HostJamPeerTransportRecvRequest = T.HostJamPeerTransportRecvRequest;\nexport import HostJamPeerTransportRecvResponse = T.HostJamPeerTransportRecvResponse;\nexport import HostJamPeerTransportResetError = T.HostJamPeerTransportResetError;\nexport import HostJamPeerTransportResetRequest = T.HostJamPeerTransportResetRequest;\nexport import HostJamPeerTransportSendError = T.HostJamPeerTransportSendError;\nexport import HostJamPeerTransportSendRequest = T.HostJamPeerTransportSendRequest;\nexport import HostLocalStorageChangeItem = T.HostLocalStorageChangeItem;\nexport import HostLocalStorageClearRequest = T.HostLocalStorageClearRequest;\nexport import V01HostLocalStorageReadError = T.V01HostLocalStorageReadError;\nexport import V01HostLocalStorageReadRequest = T.V01HostLocalStorageReadRequest;\nexport import HostLocalStorageReadResponse = T.HostLocalStorageReadResponse;\nexport import HostLocalStorageSubscribeRequest = T.HostLocalStorageSubscribeRequest;\nexport import HostLocalStorageWriteRequest = T.HostLocalStorageWriteRequest;\nexport import V01HostLocaleSubscribeItem = T.V01HostLocaleSubscribeItem;\nexport import HostNavigateToError = T.HostNavigateToError;\nexport import HostNavigateToRequest = T.HostNavigateToRequest;\nexport import HostPaymentBalanceSubscribeError = T.HostPaymentBalanceSubscribeError;\nexport import HostPaymentBalanceSubscribeItem = T.HostPaymentBalanceSubscribeItem;\nexport import HostPaymentBalanceSubscribeRequest = T.HostPaymentBalanceSubscribeRequest;\nexport import HostPaymentError = T.HostPaymentError;\nexport import HostPaymentRequest = T.HostPaymentRequest;\nexport import HostPaymentResponse = T.HostPaymentResponse;\nexport import HostPaymentStatusSubscribeError = T.HostPaymentStatusSubscribeError;\nexport import HostPaymentStatusSubscribeItem = T.HostPaymentStatusSubscribeItem;\nexport import HostPaymentStatusSubscribeRequest = T.HostPaymentStatusSubscribeRequest;\nexport import HostPaymentTopUpError = T.HostPaymentTopUpError;\nexport import HostPaymentTopUpRequest = T.HostPaymentTopUpRequest;\nexport import HostPocketListSubscribeItem = T.HostPocketListSubscribeItem;\nexport import HostPocketRemoveCardError = T.HostPocketRemoveCardError;\nexport import HostPocketRemoveCardRequest = T.HostPocketRemoveCardRequest;\nexport import HostPushNotificationCancelRequest = T.HostPushNotificationCancelRequest;\nexport import HostPushNotificationError = T.HostPushNotificationError;\nexport import HostPushNotificationRequest = T.HostPushNotificationRequest;\nexport import HostPushNotificationResponse = T.HostPushNotificationResponse;\nexport import HostRendererActionSubscribeItem = T.HostRendererActionSubscribeItem;\nexport import HostRequestLoginError = T.HostRequestLoginError;\nexport import HostRequestLoginRequest = T.HostRequestLoginRequest;\nexport import HostRequestLoginResponse = T.HostRequestLoginResponse;\nexport import HostRequestResourceAllocationRequest = T.HostRequestResourceAllocationRequest;\nexport import HostRequestResourceAllocationResponse = T.HostRequestResourceAllocationResponse;\nexport import HostSignPayloadError = T.HostSignPayloadError;\nexport import HostSignPayloadRequest = T.HostSignPayloadRequest;\nexport import HostSignPayloadResponse = T.HostSignPayloadResponse;\nexport import HostSignPayloadWithLegacyAccountRequest = T.HostSignPayloadWithLegacyAccountRequest;\nexport import HostSignRawRequest = T.HostSignRawRequest;\nexport import HostSignRawWithLegacyAccountRequest = T.HostSignRawWithLegacyAccountRequest;\nexport import HostThemeSubscribeItem = T.HostThemeSubscribeItem;\nexport import HostWorkerBeginOperationRequest = T.HostWorkerBeginOperationRequest;\nexport import HostWorkerBeginOperationResponse = T.HostWorkerBeginOperationResponse;\nexport import HostWorkerEndOperationRequest = T.HostWorkerEndOperationRequest;\nexport import ProductRendererRenderRequest = T.ProductRendererRenderRequest;\nexport import RemoteChainHeadBodyRequest = T.RemoteChainHeadBodyRequest;\nexport import RemoteChainHeadBodyResponse = T.RemoteChainHeadBodyResponse;\nexport import RemoteChainHeadCallRequest = T.RemoteChainHeadCallRequest;\nexport import RemoteChainHeadCallResponse = T.RemoteChainHeadCallResponse;\nexport import RemoteChainHeadContinueRequest = T.RemoteChainHeadContinueRequest;\nexport import RemoteChainHeadFollowItem = T.RemoteChainHeadFollowItem;\nexport import RemoteChainHeadFollowRequest = T.RemoteChainHeadFollowRequest;\nexport import RemoteChainHeadHeaderRequest = T.RemoteChainHeadHeaderRequest;\nexport import RemoteChainHeadHeaderResponse = T.RemoteChainHeadHeaderResponse;\nexport import RemoteChainHeadStopOperationRequest = T.RemoteChainHeadStopOperationRequest;\nexport import RemoteChainHeadStorageRequest = T.RemoteChainHeadStorageRequest;\nexport import RemoteChainHeadStorageResponse = T.RemoteChainHeadStorageResponse;\nexport import RemoteChainHeadUnpinRequest = T.RemoteChainHeadUnpinRequest;\nexport import RemoteChainInfoError = T.RemoteChainInfoError;\nexport import RemoteChainInfoRequest = T.RemoteChainInfoRequest;\nexport import RemoteChainInfoResponse = T.RemoteChainInfoResponse;\nexport import RemoteChainSpecChainNameRequest = T.RemoteChainSpecChainNameRequest;\nexport import RemoteChainSpecChainNameResponse = T.RemoteChainSpecChainNameResponse;\nexport import RemoteChainSpecGenesisHashRequest = T.RemoteChainSpecGenesisHashRequest;\nexport import RemoteChainSpecGenesisHashResponse = T.RemoteChainSpecGenesisHashResponse;\nexport import RemoteChainSpecPropertiesRequest = T.RemoteChainSpecPropertiesRequest;\nexport import RemoteChainSpecPropertiesResponse = T.RemoteChainSpecPropertiesResponse;\nexport import RemoteChainTransactionBroadcastRequest = T.RemoteChainTransactionBroadcastRequest;\nexport import RemoteChainTransactionBroadcastResponse = T.RemoteChainTransactionBroadcastResponse;\nexport import RemoteChainTransactionStopRequest = T.RemoteChainTransactionStopRequest;\nexport import RemotePermissionRequest = T.RemotePermissionRequest;\nexport import RemotePermissionResponse = T.RemotePermissionResponse;\nexport import RemotePreimageLookupSubscribeItem = T.RemotePreimageLookupSubscribeItem;\nexport import RemotePreimageLookupSubscribeRequest = T.RemotePreimageLookupSubscribeRequest;\nexport import RemoteStatementStoreCreateProofError = T.RemoteStatementStoreCreateProofError;\nexport import RemoteStatementStoreCreateProofRequest = T.RemoteStatementStoreCreateProofRequest;\nexport import RemoteStatementStoreCreateProofResponse = T.RemoteStatementStoreCreateProofResponse;\nexport import RemoteStatementStoreSubscribeItem = T.RemoteStatementStoreSubscribeItem;\nexport import RemoteStatementStoreSubscribeRequest = T.RemoteStatementStoreSubscribeRequest;\nexport import HostLocalStorageReadError = T.HostLocalStorageReadError;\nexport import HostLocalStorageReadRequest = T.HostLocalStorageReadRequest;\nexport import HostLocaleLocalizeTimestampsRequest = T.HostLocaleLocalizeTimestampsRequest;\nexport import HostLocaleLocalizeTimestampsResponse = T.HostLocaleLocalizeTimestampsResponse;\nexport import HostLocaleSubscribeItem = T.HostLocaleSubscribeItem;\nexport import VerticalAlignment = T.VerticalAlignment;\nexport import VrfSignature = T.VrfSignature;\nexport import VrfTranscriptItem = T.VrfTranscriptItem;\n\n// index.d.ts\n\n\n// transport.d.ts\n/**\n * Wire trait discriminant reserved for method-independent protocol errors. No\n * API trait may declare it, so no method is ever addressed here.\n **/\nexport declare const PROTOCOL_ERROR_TRAIT_ID: 255;\n/** Wire method discriminant reserved for method-independent protocol errors. **/\nexport declare const PROTOCOL_ERROR_METHOD_ID: 255;\n/** The peer rejected an outbound frame because it does not support its API. **/\nexport declare class UnsupportedMessageError extends Error {\n /** Trait discriminant of the unsupported outbound frame. **/\n readonly traitId: number;\n /** Method discriminant of the unsupported outbound frame. **/\n readonly methodId: number;\n constructor(traitId: number, methodId: number);\n}\n/** The host connection ended; interrupted operations are not retried. */\nexport declare class ConnectionResetError extends Error {\n constructor(options?: ErrorOptions);\n}\n/** Call result returned when the peer does not recognize a request frame. **/\nexport type UnsupportedCallError = Extract, {\n tag: \"Unsupported\";\n}>;\n/**\n * Handle returned by TrUAPI subscription APIs.\n **/\nexport interface Subscription {\n /**\n * Stop the subscription. Calling this more than once has no additional effect.\n **/\n unsubscribe: () => void;\n /**\n * Transport-assigned request id for the subscription start frame.\n *\n * Methods that accept a `followSubscriptionId` use this value to scope\n * follow-up requests to a specific active subscription.\n **/\n subscriptionId: string;\n}\n/**\n * Terminal error delivered through `Observer.error` for every non-normal\n * subscription end. When the peer interrupted the stream with a typed payload,\n * `reason` carries the decoded `Reason`; otherwise `reason` is `undefined` and\n * the underlying transport/decode error is preserved on `cause`.\n *\n * Discriminate with `error.reason !== undefined` (or `'reason' in error`).\n **/\nexport declare class SubscriptionError extends Error {\n /**\n * Typed payload supplied by the peer when it interrupted the subscription.\n * `undefined` when the stream ended for any other reason (transport close,\n * decode failure, malformed interrupt payload).\n **/\n readonly reason?: Reason;\n constructor(message: string, options?: {\n reason?: Reason;\n cause?: unknown;\n });\n}\n/**\n * Minimal Observable-compatible observer shape used by generated subscription\n * APIs without depending on RxJS.\n *\n * `Reason` is the typed interrupt payload for the originating subscription.\n * Methods without a typed interrupt resolve `Reason` to `never`, leaving\n * `error.reason` typed as `undefined`.\n **/\nexport interface Observer {\n /**\n * Called with each successfully decoded subscription item.\n **/\n next(value: Item): void;\n /**\n * Called once when the stream terminates with an error. Inspect\n * `error.reason` to distinguish a typed peer interrupt from a transport or\n * decode failure (`error.cause` carries the underlying failure in the\n * latter case).\n **/\n error(error: SubscriptionError): void;\n /**\n * Called once when the peer normally completes the stream.\n **/\n complete(): void;\n}\ndeclare global {\n interface SymbolConstructor {\n readonly observable: unique symbol;\n }\n}\n/**\n * Minimal Observable-compatible object returned by generated subscription APIs.\n *\n * Implements the ES Observable interop protocol so that consumers can pass\n * an instance straight to `rxjs.from(...)`.\n **/\nexport interface ObservableLike {\n /**\n * Start the stream and receive `next`, `error`, and `complete` callbacks.\n **/\n subscribe(observer?: Partial>): Subscription;\n /**\n * Observable interop hook. Returns `this`.\n **/\n [Symbol.observable](): ObservableLike;\n}\n/**\n * Product-side handler for a subscription the native host initiates.\n *\n * It receives the decoded request and two callbacks: `send` delivers one item\n * to the host, and `interrupt` ends the stream, cleanly when called with no\n * argument and with the method's interrupt value otherwise. The returned\n * teardown, if any, runs once the stream ends: on the host's stop frame, on\n * `interrupt`, when the transport closes, or when the host restarts the same\n * request id.\n **/\nexport type HostInitiatedSubscriptionHandler = (request: Request, send: (item: Item) => void, interrupt: (reason?: Reason) => void) => (() => void) | void;\n/**\n * Wire discriminant pair addressing a method. One id addresses a method\n * regardless of shape (request/response, or a subscription's four phases):\n * which leg of the exchange a frame carries is the wire's own `messageType`\n * byte, not a separate id per leg.\n **/\nexport interface MethodIds {\n /**\n * Wire trait discriminant.\n **/\n trait: number;\n /**\n * Wire method discriminant within the trait.\n **/\n method: number;\n /**\n * Whether this method's legs follow the request/response shape or the\n * subscription shape (`\"subscription\"` covers both plain and result\n * subscriptions, which share the same four-leg wire shape). The one piece\n * of shape a payload-blind reader needs to interpret a frame's own\n * `messageType` byte without decoding the payload.\n **/\n kind: \"request\" | \"subscription\";\n}\n/**\n * Per-call options every generated request method accepts as its last\n * argument.\n **/\nexport interface CallOptions {\n /** See {@link RequestParams.signal}. **/\n signal?: AbortSignal;\n}\n/**\n * Options accepted by `TrUApiTransport.request`.\n **/\nexport interface RequestParams {\n /**\n * Wire discriminants for this request method.\n **/\n ids: MethodIds;\n /**\n * SCALE-encoded request wrapper payload bytes (its own `V` tag is the\n * wire's only version signal), constructed by the generated caller.\n **/\n payload: Uint8Array;\n /**\n * Decode a `Response`-leg frame's raw payload bytes into the typed Ok/Err\n * outcome. Implementations decode `Result<{Method}Response,\n * CallError<{Method}Error>>` directly. The transport unwraps the result\n * into `ResultAsync`.\n **/\n decodeResponse: (payload: Uint8Array) => ResultPayload;\n /**\n * Withdraw the call. Aborting sends a `Cancel` frame on this method's own\n * address; the promise still settles on the response the host sends, which\n * for a call the host stopped is `CallError::Cancelled`. A signal already\n * aborted when the call is made sends nothing and rejects immediately.\n *\n * A host that predates the `Cancel` leg drops the frame, so an aborted call\n * against one settles on its deadline instead. There is no way to detect that\n * first: `system.featureSupported` answers only about chains, so an abort\n * against an older host is indistinguishable from one it honoured.\n **/\n signal?: AbortSignal;\n}\n/**\n * Options accepted by `TrUApiTransport.subscribeRaw`.\n **/\nexport interface SubscribeRawParams {\n /**\n * Wire discriminants for this subscription method.\n **/\n ids: MethodIds;\n /**\n * SCALE-encoded `Start`-leg payload bytes: the request wrapper's own\n * encoding, or empty bytes for a method with no request at all,\n * constructed by the generated caller.\n **/\n payload: Uint8Array;\n /**\n * Called with a `Receive`-leg frame's raw payload bytes.\n **/\n onReceive: (payload: Uint8Array) => void;\n /**\n * Called with an `Interrupt`-leg frame's raw payload bytes.\n **/\n onInterrupt?: (payload: Uint8Array) => void;\n /**\n * Called when a transport-level error or unsupported start frame terminates\n * the subscription.\n **/\n onClose?: (error: Error) => void;\n}\n/** Product-side registration for one host-initiated subscription method. **/\nexport interface HostInitiatedSubscriptionRegistration {\n /** Install or replace the handler used for future start frames. **/\n setHandler(handler: HostInitiatedSubscriptionHandler): {\n unsubscribe(): void;\n };\n}\n/** Options used to register a host-initiated subscription method. **/\nexport interface RegisterHostInitiatedSubscriptionParams {\n /** Wire discriminants for the host-initiated subscription. **/\n ids: MethodIds;\n /**\n * Decode a `Start`-leg frame's raw payload bytes into the typed request.\n **/\n decodeRequest(payload: Uint8Array): Request;\n /**\n * Encode one product emission as a `Receive`-leg frame's raw payload bytes.\n **/\n encodeItem(item: Item): Uint8Array;\n /**\n * Encode an `Interrupt`-leg frame's raw payload bytes: the stream's clean\n * end when `reason` is omitted, and the method's interrupt value otherwise.\n **/\n encodeInterrupt(reason?: Reason): Uint8Array;\n /**\n * Exact payload used when the transport ends a stream the product's handler\n * never got to serve.\n **/\n declinePayload: Uint8Array;\n /** Number of starts retained before a handler is installed. **/\n bufferCapacity: number;\n}\n/**\n * Byte-level transport used by generated client stubs.\n **/\nexport interface TrUApiTransport {\n /**\n * Send a one-shot request and resolve with the typed Ok/Err outcome.\n **/\n request(params: RequestParams): ResultAsync;\n /**\n * Start a subscription and return a handle that can stop it.\n **/\n subscribeRaw(params: SubscribeRawParams): Subscription;\n /** Register product-side handling for a host-initiated subscription. **/\n registerHostInitiatedSubscription(params: RegisterHostInitiatedSubscriptionParams): HostInitiatedSubscriptionRegistration;\n /**\n * Tear down the transport and release the listeners it registered on the\n * underlying `WireProvider`. Pending requests reject and live subscriptions\n * receive `onClose`. Idempotent.\n *\n * The provider itself is left alone; the caller decides whether to also\n * call `provider.dispose()` (long-lived hosts that swap providers will\n * typically dispose the transport but keep the provider).\n **/\n dispose(): void;\n}\n/**\n * Tagged payload inside a TrUAPI wire frame.\n **/\nexport interface Payload {\n /**\n * Wire-table trait discriminant: first byte of the `(trait, method)` pair.\n **/\n traitId: number;\n /**\n * Wire-table method discriminant within the trait: second byte of the pair.\n **/\n methodId: number;\n /**\n * Which leg of the method's exchange this frame carries: `Request`/`Start`\n * = 0, `Response`/`Receive` = 1, `Interrupt` = 2, `Stop` = 3. Third byte of\n * the wire frame \u2014 readable generically, without decoding `value`.\n **/\n messageType: number;\n /**\n * SCALE-encoded payload body: that leg's own versioned wrapper, with no\n * further tag identifying direction or version beyond the wrapper's own.\n **/\n value: Uint8Array;\n}\n/** See {@link Payload.messageType}. */\nexport declare const MESSAGE_TYPE_REQUEST = 0;\n/** See {@link Payload.messageType}. */\nexport declare const MESSAGE_TYPE_START = 0;\n/** See {@link Payload.messageType}. */\nexport declare const MESSAGE_TYPE_RESPONSE = 1;\n/** See {@link Payload.messageType}. */\nexport declare const MESSAGE_TYPE_RECEIVE = 1;\n/** See {@link Payload.messageType}. */\nexport declare const MESSAGE_TYPE_INTERRUPT = 2;\n/** See {@link Payload.messageType}. */\nexport declare const MESSAGE_TYPE_STOP = 3;\n/**\n * A request's withdrawal, correlated by the same `requestId` and carrying no\n * payload. The call still settles with exactly one response; this only fires\n * the handler's cancellation token on the far side.\n **/\nexport declare const MESSAGE_TYPE_CANCEL = 4;\n/**\n * Top-level TrUAPI wire message.\n **/\nexport interface ProtocolMessage {\n /**\n * Request id used to correlate request/response and subscription frames.\n **/\n requestId: string;\n /**\n * Tagged SCALE payload carried by this frame.\n **/\n payload: Payload;\n}\n/**\n * Raw SCALE-wire-frame pipe abstraction used by the transport. A `WireProvider`\n * is the low-level channel (a `MessagePort` or iframe `postMessage` link) that\n * carries encoded frames between the product and the host.\n **/\nexport interface WireProvider {\n /**\n * Send a complete SCALE-encoded wire frame to the peer.\n **/\n postMessage(message: Uint8Array): void;\n /**\n * Register a callback for inbound SCALE-encoded wire frames.\n **/\n subscribe(callback: (message: Uint8Array) => void): () => void;\n /**\n * Register a callback for provider-level close or failure events.\n *\n * Providers keep a terminal close reason. The callback fires at most once\n * for an active subscription, and fires immediately when registered after\n * the provider has already closed.\n **/\n subscribeClose?(callback: (error: Error) => void): () => void;\n /** End current operations while keeping the provider available for new work. */\n subscribeReset?(callback: (error: Error) => void): () => void;\n /**\n * Release provider resources and close the underlying pipe.\n **/\n dispose(): void;\n}\n/**\n * A {@link WireProvider} backed by a WebSocket, which reports when its socket\n * is up. Awaiting {@link WebSocketWireProvider.opened} is optional: frames\n * posted earlier are queued and flushed on open.\n **/\nexport interface WebSocketWireProvider extends WireProvider {\n /** Resolves once the socket is open, rejects if it never connects. */\n opened: Promise;\n}\n/**\n * Encode a `ProtocolMessage` into a SCALE wire frame.\n **/\nexport declare function encodeWireMessage(message: ProtocolMessage): Result;\n/**\n * Decode a SCALE wire frame into a `ProtocolMessage`.\n **/\nexport declare function decodeWireMessage(message: Uint8Array): Result;\n/**\n * Create a provider for the child side of an iframe `postMessage` channel.\n *\n * `target` is the `Window` the provider posts to (typically `window.parent`);\n * `hostOrigin` is the pinned `targetOrigin` for outbound frames and the\n * required `event.origin` of inbound frames. The provider only delivers\n * frames whose `event.source === target` and `event.origin === hostOrigin`,\n * so it cannot be coerced by an unrelated frame parent.\n **/\nexport declare function createIframeProvider(options: {\n target: Window;\n hostOrigin: string;\n}): WireProvider;\n/**\n * Create a provider from a web or Electron `MessagePort`.\n **/\nexport declare function createMessagePortProvider(port: MessagePort | Promise): WireProvider;\n/**\n * Wire provider over a binary WebSocket, one message per SCALE frame.\n *\n * This is the transport a host exposes on a loopback socket: the Rust core's\n * `ws-bridge`, and `truapi-host signing-host --frame-listen`. The frame bytes\n * are identical to what the {@link createMessagePortProvider} path carries, so\n * this is a pipe and nothing more.\n *\n * Frames posted before the socket opens are queued and flushed on open, so a\n * caller never has to await {@link WebSocketWireProvider.opened} first.\n **/\nexport declare function createWebSocketProvider(url: string): WebSocketWireProvider;\n/** Capture native socket APIs before product code installs network gates. */\nexport declare function createWebSocketProviderFactory(): (url: string) => WebSocketWireProvider;\n\n\n// client.d.ts\nexport type { Subscription, TrUApiTransport };\n/** A request received no matching response before its transport deadline. */\nexport declare class RequestTimeoutError extends Error {\n /** Transport-assigned request identifier. */\n readonly requestId: string;\n /** Trait discriminant of the unanswered request. */\n readonly traitId: number;\n /** Method discriminant of the unanswered request. */\n readonly methodId: number;\n /** Deadline that elapsed, in milliseconds. */\n readonly timeoutMs: number;\n constructor(requestId: string, traitId: number, methodId: number, timeoutMs: number);\n}\n/**\n * Options accepted when constructing a transport.\n */\nexport interface CreateTransportOptions {\n /** Request ID namespace when multiple transports share a connection. Defaults to `p:`. */\n requestIdPrefix?: string;\n /** Wait for connection readiness before sending a request or starting a subscription. */\n prepare?: (ids: MethodIds) => Promise;\n /** Replace a failed connection after a malformed frame; otherwise the transport closes permanently. */\n onProtocolError?: (error: Error) => void;\n /**\n * Maximum time to wait for a matching response before rejecting the request.\n *\n * Defaults to 120 seconds. This bounds dead hosts and missed transport\n * handshakes while leaving interactive approval flows enough time to finish.\n * The handshake keeps its own shorter deadline, since a codec mismatch means\n * no answer is ever coming.\n */\n requestTimeoutMs?: number;\n}\n/**\n * Build a `TrUApiTransport` on top of a `WireProvider`, adding request/response\n * correlation and subscription start/receive/stop lifecycle handling.\n */\nexport declare function createTransport(provider: WireProvider, options?: CreateTransportOptions): TrUApiTransport;\n\n\n// generated/index.d.ts\n\n\n// generated/client.d.ts\nexport { ResultAsync, SubscriptionError };\nexport type { CallOptions, HostInitiatedSubscriptionHandler, ObservableLike, Observer, Result, Subscription, TrUApiTransport };\nexport declare const TRUAPI_VERSION: 2;\nexport declare const TRUAPI_CODEC_VERSION: 3;\nexport declare const TRUAPI_WIRE_SCHEMA_HASH: \"62e34089b454506c\";\n/** Account lookup, aliasing, and proof generation. */\nexport declare class AccountClient {\n #private;\n constructor(transport: TrUApiTransport);\n /** Subscribe to account connection status changes. */\n connectionStatusSubscribe(): ObservableLike>;\n /** Retrieve a product-scoped account. */\n getAccount(request: T.HostAccountGetRequest, options?: CallOptions): ResultAsync>;\n /** Retrieve the contextual alias for a context and ring. */\n getAccountAlias(request: T.HostAccountGetAliasRequest, options?: CallOptions): ResultAsync>;\n /** Generate a ring VRF proof with an explicitly registered member key. */\n createAccountProof(request: T.HostAccountCreateProofRequest, options?: CallOptions): ResultAsync>;\n /**\n * Produce an sr25519 (schnorrkel) VRF signature from a product account.\n *\n * The host builds a Merlin transcript from `transcriptLabel` and `items`\n * and signs it with the account's key, returning the VRF pre-output and\n * proof. Authorized like signing: local when `AutoSigning` covers the\n * account, otherwise a per-call user confirmation.\n */\n signVrf(request: T.HostAccountSignVrfRequest, options?: CallOptions): ResultAsync>;\n /** Register a ring-VRF key owned by the calling product. */\n registerRingVrfKey(request: T.HostAccountRegisterRingVrfKeyRequest, options?: CallOptions): ResultAsync>;\n /** List registered ring-VRF keys owned by a product. */\n listRingVrfKeys(request: T.HostAccountListRingVrfKeysRequest, options?: CallOptions): ResultAsync, S.CallErrorValue>;\n /** Sign bytes directly with a registered ring-VRF member key. */\n ringVrfSign(request: T.HostAccountRingVrfSignRequest, options?: CallOptions): ResultAsync>;\n /**\n * List non-product accounts the user owns.\n *\n * Current hosts do not expose non-product accounts, so the list is empty.\n */\n getLegacyAccounts(options?: CallOptions): ResultAsync>;\n /** Fetch the user's primary identity. */\n getUserId(options?: CallOptions): ResultAsync>;\n /**\n * Request the host to present the login flow to the user.\n *\n * Products should call this in response to a user action (e.g. tapping a\n * \"Sign in\" button), not automatically on load.\n */\n requestLogin(request: T.HostRequestLoginRequest, options?: CallOptions): ResultAsync>;\n}\n/** Chain interaction methods. */\nexport declare class ChainClient {\n #private;\n constructor(transport: TrUApiTransport);\n /** Follow the chain head and receive block events. */\n followHeadSubscribe({ request }: {\n request: T.RemoteChainHeadFollowRequest;\n }): ObservableLike>;\n /** Fetch a block header. */\n getHeadHeader(request: T.RemoteChainHeadHeaderRequest, options?: CallOptions): ResultAsync>;\n /** Fetch a block body. */\n getHeadBody(request: T.RemoteChainHeadBodyRequest, options?: CallOptions): ResultAsync>;\n /** Query runtime storage at a specific block. */\n getHeadStorage(request: T.RemoteChainHeadStorageRequest, options?: CallOptions): ResultAsync>;\n /** Invoke a runtime call at a specific block. */\n callHead(request: T.RemoteChainHeadCallRequest, options?: CallOptions): ResultAsync>;\n /** Release pinned blocks. */\n unpinHead(request: T.RemoteChainHeadUnpinRequest, options?: CallOptions): ResultAsync>;\n /** Continue a paused chain-head operation. */\n continueHead(request: T.RemoteChainHeadContinueRequest, options?: CallOptions): ResultAsync>;\n /** Stop a chain-head operation. */\n stopHeadOperation(request: T.RemoteChainHeadStopOperationRequest, options?: CallOptions): ResultAsync>;\n /** Fetch the canonical genesis hash for a chain. */\n getSpecGenesisHash(request: T.RemoteChainSpecGenesisHashRequest, options?: CallOptions): ResultAsync>;\n /** Fetch the display name of a chain. */\n getSpecChainName(request: T.RemoteChainSpecChainNameRequest, options?: CallOptions): ResultAsync>;\n /** Fetch the JSON-encoded properties of a chain. */\n getSpecProperties(request: T.RemoteChainSpecPropertiesRequest, options?: CallOptions): ResultAsync>;\n /** Broadcast a signed transaction. */\n broadcastTransaction(request: T.RemoteChainTransactionBroadcastRequest, options?: CallOptions): ResultAsync>;\n /** Stop a transaction broadcast. */\n stopTransaction(request: T.RemoteChainTransactionStopRequest, options?: CallOptions): ResultAsync>;\n /**\n * Resolve a chain identifier to its genesis hash against the host's\n * configured environment (RFC 0026).\n */\n getChainInfo(request: T.RemoteChainInfoRequest, options?: CallOptions): ResultAsync>;\n}\n/** Chat room, bot, and message APIs. */\nexport declare class ChatClient {\n #private;\n constructor(transport: TrUApiTransport);\n /** Create a chat room. */\n createRoom(request: T.HostChatCreateRoomRequest, options?: CallOptions): ResultAsync>;\n /** Register a chat bot. */\n registerBot(request: T.HostChatRegisterBotRequest, options?: CallOptions): ResultAsync>;\n /** Subscribe to the list of chat rooms. */\n listSubscribe(): ObservableLike>;\n /**\n * Post a message to a chat room.\n *\n * The host bounds and screens what it forwards. Message text is capped at\n * 16 KiB and keeps line breaks and tabs, but is rejected for other\n * control characters and for bidirectional overrides. Identifiers and\n * display names are normalized and screened. A message carries at most 32\n * actions and 32 media items, a custom payload at most 256 KiB, and a URL\n * at most 2 KiB which must be `https` or an inline raster image. A\n * rejection reports `MessageTooLarge` when the body or custom payload is\n * over budget, and `Unknown` with a reason naming the field otherwise.\n *\n * The returned `messageId` is the correlation key for any action the\n * message carries: a later `actionSubscribe` trigger names it.\n */\n postMessage(request: T.HostChatPostMessageRequest, options?: CallOptions): ResultAsync>;\n /** Subscribe to received chat actions. */\n actionSubscribe(): ObservableLike>;\n}\n/**\n * CoinPayment operations.\n *\n * RFC 0017 describes `Resolvable` values for long-running operations.\n * TrUAPI represents those as subscriptions whose items are the RFC status\n * updates.\n */\nexport declare class CoinPaymentClient {\n #private;\n constructor(transport: TrUApiTransport);\n /** Create a new firewalled CoinPayment purse. */\n createPurse(request: T.HostCoinPaymentCreatePurseRequest, options?: CallOptions): ResultAsync>;\n /** Query product-visible purse metadata and balance. */\n queryPurse(request: T.HostCoinPaymentQueryPurseRequest, options?: CallOptions): ResultAsync>;\n /** Transfer balance between local purses. */\n rebalancePurse({ request }: {\n request: T.HostCoinPaymentRebalancePurseRequest;\n }): ObservableLike>;\n /** Delete a purse after draining its balance into another local purse. */\n deletePurse({ request }: {\n request: T.HostCoinPaymentDeletePurseRequest;\n }): ObservableLike>;\n /** Create a receivable public key for depositing into a purse. */\n createReceivable(request: T.HostCoinPaymentCreateReceivableRequest, options?: CallOptions): ResultAsync>;\n /** Create a cheque paying from a local purse to a receivable. */\n createCheque(request: T.HostCoinPaymentCreateChequeRequest, options?: CallOptions): ResultAsync>;\n /** Claim coins from a cheque into the receivable's purse. */\n deposit({ request }: {\n request: T.HostCoinPaymentDepositRequest;\n }): ObservableLike>;\n /** Attempt to return coins associated with a receivable. */\n refund({ request }: {\n request: T.HostCoinPaymentRefundRequest;\n }): ObservableLike>;\n /** Listen for a cheque delivered through a standard transmission channel. */\n listenForPayment({ request }: {\n request: T.HostCoinPaymentListenForRequest;\n }): ObservableLike>;\n}\n/**\n * User-mediated access to the user's contacts.\n *\n * A product never reads the contact list. It opens the host's picker; the host\n * renders an overlay from the chat lists its chat extensions hold, and\n * returns only the person the user selected. Names, accounts, and every other\n * contact the user did not pick stay host-side.\n *\n * That is also why there is no permission to request: the user choosing a\n * contact in host UI is the consent, and a product that is never handed the\n * list has nothing to be granted.\n */\nexport declare class ContactsClient {\n #private;\n constructor(transport: TrUApiTransport);\n /**\n * Ask the host to let the user pick one contact.\n *\n * Resolves with the chosen contact's handle, or with why nothing was\n * chosen. A host that serves no picker answers `Unsupported`.\n *\n * The handle is not an address and cannot be turned into one. To pay the\n * person it names, put the handle where the recipient goes in the call and\n * list it in `contacts` on the transaction payload: the host replaces it\n * with their account before anything is signed or shown. A handle sent\n * anywhere else is 32 bytes that resolve to nobody.\n */\n pick(request: T.HostContactsPickRequest, options?: CallOptions): ResultAsync>;\n}\n/** Deterministic entropy derivation. */\nexport declare class EntropyClient {\n #private;\n constructor(transport: TrUApiTransport);\n /** Derive deterministic entropy. */\n derive(request: T.HostDeriveEntropyRequest, options?: CallOptions): ResultAsync>;\n}\n/**\n * Host-terminated QUIC/WebTransport streams to JAM peers (JAMNP-S).\n *\n * The host owns TLS, certificate verification and length framing; the guest\n * verifies every byte it consumes. Access is a runtime permission, not a\n * manifest declaration: `dial` requires\n * [`RemotePermission::JamPeers`](crate::v01::RemotePermission::JamPeers) for\n * its `genesis`, checking the product's stored decision, prompting when it is\n * undetermined and persisting the answer per product and genesis. The other\n * methods act only on connections a granted `dial` opened. A grant is\n * separate from account, signing and storage authority.\n */\nexport declare class JamPeerTransportClient {\n #private;\n constructor(transport: TrUApiTransport);\n /**\n * Dial one peer. The host builds the ALPN from `genesis` and requires the\n * peer certificate to carry `ed25519` (QUIC) or to hash to the\n * certificate derived from `p256` (WebTransport).\n */\n dial(request: T.HostJamPeerTransportDialRequest, options?: CallOptions): ResultAsync>;\n /** Open a bidirectional stream on a connection and send its kind byte. */\n open(request: T.HostJamPeerTransportOpenRequest, options?: CallOptions): ResultAsync>;\n /** Queue one message; the host prepends the `u32` little-endian length. */\n send(request: T.HostJamPeerTransportSendRequest, options?: CallOptions): ResultAsync>;\n /** Poll one complete message without blocking; the host strips the length. */\n recv(request: T.HostJamPeerTransportRecvRequest, options?: CallOptions): ResultAsync>;\n /** Abort a stream in both directions. */\n reset(request: T.HostJamPeerTransportResetRequest, options?: CallOptions): ResultAsync>;\n /** Close a connection and every stream on it. */\n close(request: T.HostJamPeerTransportCloseRequest, options?: CallOptions): ResultAsync>;\n /** Drain connection, stream-finish and inbound-stream events. */\n events(options?: CallOptions): ResultAsync>;\n}\n/** Local key/value storage scoped to the calling product. */\nexport declare class LocalStorageClient {\n #private;\n constructor(transport: TrUApiTransport);\n /** Read a value by key. */\n read(request: T.HostLocalStorageReadRequest, options?: CallOptions): ResultAsync>;\n /** Write a value to a key. */\n write(request: T.HostLocalStorageWriteRequest, options?: CallOptions): ResultAsync>;\n /** Clear a value by key. */\n clear(request: T.HostLocalStorageClearRequest, options?: CallOptions): ResultAsync>;\n /**\n * Subscribe to changes of one key in the product's own storage namespace.\n *\n * Emits the current value immediately, then one item per later write or\n * clear of the key by any of the product's runtimes. A write that leaves\n * the stored bytes unchanged emits nothing.\n */\n subscribe({ request }: {\n request: T.HostLocalStorageSubscribeRequest;\n }): ObservableLike>;\n}\n/** Host locale subscription. */\nexport declare class LocaleClient {\n #private;\n constructor(transport: TrUApiTransport);\n /** Subscribe to the host's selected locale. */\n subscribe(): ObservableLike>;\n /** Localize a bounded batch of UTC instants in a host locale snapshot. */\n localizeTimestamps(request: T.HostLocaleLocalizeTimestampsRequest, options?: CallOptions): ResultAsync>;\n}\n/** Notification methods for locally-rendered push notifications. */\nexport declare class NotificationsClient {\n #private;\n constructor(transport: TrUApiTransport);\n /**\n * Send a push notification to the user.\n *\n * Returns a notification id that can be\n * passed to [`cancel_push_notification`](Self::cancel_push_notification)\n * to retract a scheduled notification. When `scheduled_at` is set the host\n * persists the notification across restarts and fires it through the\n * platform-native scheduler. See [RFC 0019].\n *\n * [RFC 0019]: https://github.com/paritytech/trinity-user-agents/blob/main/docs/rfcs/0019-scheduled-notifications.md\n */\n sendPushNotification(request: T.HostPushNotificationRequest, options?: CallOptions): ResultAsync>;\n /**\n * Cancels a previously issued push notification.\n *\n * Cancellation is idempotent: returns `Ok(())` whether the notification is\n * still pending, already fired, or was never issued. See [RFC 0019].\n *\n * [RFC 0019]: https://github.com/paritytech/trinity-user-agents/blob/main/docs/rfcs/0019-scheduled-notifications.md\n */\n cancelPushNotification(request: T.HostPushNotificationCancelRequest, options?: CallOptions): ResultAsync>;\n}\n/** Payment request and balance/status subscription methods. */\nexport declare class PaymentClient {\n #private;\n constructor(transport: TrUApiTransport);\n /** Subscribe to payment balance updates. */\n balanceSubscribe({ request }: {\n request: T.HostPaymentBalanceSubscribeRequest;\n }): ObservableLike>;\n /** Request a payment from the user. */\n request(request: T.HostPaymentRequest, options?: CallOptions): ResultAsync>;\n /** Subscribe to payment lifecycle updates for a specific payment. */\n statusSubscribe({ request }: {\n request: T.HostPaymentStatusSubscribeRequest;\n }): ObservableLike>;\n /** Top up the user's payment balance. */\n topUp(request: T.HostPaymentTopUpRequest, options?: CallOptions): ResultAsync>;\n}\n/** Permission request methods. */\nexport declare class PermissionsClient {\n #private;\n constructor(transport: TrUApiTransport);\n /** Request a device-capability permission from the user. */\n requestDevicePermission(request: T.HostDevicePermissionRequest, options?: CallOptions): ResultAsync>;\n /**\n * Request a remote-operation permission.\n *\n * This example makes live requests to Frankfurter after permission is granted.\n */\n requestRemotePermission(request: T.RemotePermissionRequest, options?: CallOptions): ResultAsync>;\n}\n/**\n * Pocket cards backed by the calling product.\n *\n * The host owns the collection: a product observes its own cards and may\n * remove them, but cannot add one.\n */\nexport declare class PocketClient {\n #private;\n constructor(transport: TrUApiTransport);\n /**\n * Subscribe to the calling product's cards.\n *\n * Emits the whole set on subscribe and again after every change.\n */\n listSubscribe(): ObservableLike>;\n /**\n * Remove one of the calling product's cards.\n *\n * Removing a card that is not present succeeds. A privileged card is\n * refused with `Privileged`.\n */\n removeCard(request: T.HostPocketRemoveCardRequest, options?: CallOptions): ResultAsync>;\n}\n/** Preimage lookup and submission methods. */\nexport declare class PreimageClient {\n #private;\n constructor(transport: TrUApiTransport);\n /** Subscribe to preimage lookups for a given key. */\n lookupSubscribe({ request }: {\n request: T.RemotePreimageLookupSubscribeRequest;\n }): ObservableLike>;\n /** Submit a preimage. Returns the preimage key (hash) on success. */\n submit(request: HexString, options?: CallOptions): ResultAsync>;\n}\n/** Product-rendered bodies and the actions triggered inside them. */\nexport declare class RendererClient {\n #private;\n constructor(transport: TrUApiTransport);\n /**\n * Streams renderer trees for one product-rendered body. Each item\n * replaces the previous tree. The stream stays open while the body is\n * displayed so the product can redraw in place.\n */\n onRender(handler: HostInitiatedSubscriptionHandler>): {\n unsubscribe(): void;\n };\n /** Subscribe to actions triggered inside this product's rendered bodies. */\n actionSubscribe(): ObservableLike>;\n}\n/** Resource pre-allocation (allowance management). */\nexport declare class ResourceAllocationClient {\n #private;\n constructor(transport: TrUApiTransport);\n /** Request the host to pre-allocate one or more resources. */\n request(request: T.HostRequestResourceAllocationRequest, options?: CallOptions): ResultAsync>;\n}\n/** Signing operations. */\nexport declare class SigningClient {\n #private;\n constructor(transport: TrUApiTransport);\n /**\n * Construct a transaction for a product account.\n *\n * Served locally without a user confirmation when an RFC-0010 `AutoSigning`\n * grant covers the account; otherwise each call is confirmed by the user.\n *\n * Under Extrinsic V5, omitting `VerifyMultiSignature` from `extensions`\n * lets the host sign with the signer's key. Listing it \u2014 as `Disabled`,\n * with a proof in a later extension \u2014 encodes the given bytes verbatim and\n * returns an unsigned transaction.\n *\n * `txExtVersion` is the version of the transaction extensions in\n * `extensions`, as the runtime numbers them. The host picks the extrinsic\n * format from it. V4 always uses version 0, so a non-zero version builds a\n * V5 general transaction. Version 0 builds V5 when it includes\n * `VerifyMultiSignature`, and a signed V4 transaction otherwise.\n *\n * `contacts` lists the contact handles `callData` names, and the host\n * replaces each with the account it resolves to before the call is shown\n * or signed. A declared handle the call does not contain, or one no\n * contact matches, refuses the whole call as `UnknownContact` rather than\n * signing something that names somebody else. A call paying nobody from\n * the picker leaves it empty.\n */\n createTransaction(request: T.ProductAccountTxPayload, options?: CallOptions): ResultAsync>;\n /**\n * Construct a transaction for a non-product (legacy) account.\n *\n * The V5 `VerifyMultiSignature` rule is the same as\n * [`Signing::create_transaction`]: omit it and the host signs, list it and\n * the given bytes are used with no host signature.\n */\n createTransactionWithLegacyAccount(request: T.LegacyAccountTxPayload, options?: CallOptions): ResultAsync>;\n /** Sign raw bytes with a non-product account. */\n signRawWithLegacyAccount(request: T.HostSignRawWithLegacyAccountRequest, options?: CallOptions): ResultAsync>;\n /** Sign an extrinsic payload with a non-product account. */\n signPayloadWithLegacyAccount(request: T.HostSignPayloadWithLegacyAccountRequest, options?: CallOptions): ResultAsync>;\n /**\n * Sign raw bytes or a message.\n *\n * Served locally without a user confirmation when an RFC-0010 `AutoSigning`\n * grant covers the account; otherwise each call is confirmed by the user.\n */\n signRaw(request: T.HostSignRawRequest, options?: CallOptions): ResultAsync>;\n /**\n * Sign an extrinsic payload.\n *\n * Served locally without a user confirmation when an RFC-0010 `AutoSigning`\n * grant covers the account; otherwise each call is confirmed by the user.\n */\n signPayload(request: T.HostSignPayloadRequest, options?: CallOptions): ResultAsync>;\n /**\n * Sign the supplied data without adding or removing a watermark.\n *\n * Temporary compatibility API for runtime ownership proofs, including the\n * 32-byte Resources alias used by Humanity. Payload decoding matches\n * watermarked signing, but the decoded bytes are signed exactly as supplied.\n * This permits transaction-shaped data and requires signing authorization\n * and explicit user confirmation.\n *\n * @deprecated Temporary unwatermarked signing; migrate to watermarked signing when the runtime supports it. This API will be removed. See \n */\n signRawUnwatermarkedDeprecated(request: T.HostSignRawRequest, options?: CallOptions): ResultAsync>;\n /**\n * Sign the supplied data without adding or removing a watermark.\n *\n * Temporary compatibility API for runtime ownership proofs, including the\n * 32-byte Resources alias used by Humanity. Payload decoding matches\n * watermarked signing, but the decoded bytes are signed exactly as supplied.\n * This permits transaction-shaped data and requires signing authorization\n * and explicit user confirmation.\n *\n * @deprecated Temporary unwatermarked signing; migrate to watermarked signing when the runtime supports it. This API will be removed. See \n */\n signRawUnwatermarkedDeprecatedWithLegacyAccount(request: T.HostSignRawWithLegacyAccountRequest, options?: CallOptions): ResultAsync>;\n}\n/** Statement store methods. */\nexport declare class StatementStoreClient {\n #private;\n constructor(transport: TrUApiTransport);\n /** Subscribe to statements matching a topic filter. */\n subscribe({ request }: {\n request: T.RemoteStatementStoreSubscribeRequest;\n }): ObservableLike>;\n /**\n * Create a proof for a statement.\n *\n * **Deprecated:** use [`create_proof_authorized`](Self::create_proof_authorized)\n * instead, which uses a pre-allocated allowance account and does not\n * require a per-call signing prompt. Pairing hosts may reject this method\n * when their signing channel cannot sign statement proof payloads exactly.\n */\n createProof(request: T.RemoteStatementStoreCreateProofRequest, options?: CallOptions): ResultAsync>;\n /**\n * Create a proof for a statement using a pre-allocated allowance account,\n * bypassing the per-call signing prompt.\n */\n createProofAuthorized(request: T.Statement, options?: CallOptions): ResultAsync>;\n /**\n * Submit a signed statement to the network. The request body is the\n * [`SignedStatement`](crate::v01::SignedStatement) directly (no wrapping\n * struct), matching upstream `triangle-js-sdks`.\n */\n submit(request: T.SignedStatement, options?: CallOptions): ResultAsync>;\n}\n/**\n * General-purpose TrUAPI methods for handshake, feature detection,\n * navigation, and runtime information.\n */\nexport declare class SystemClient {\n #private;\n constructor(transport: TrUApiTransport);\n /** Negotiate the wire codec version with the product. */\n handshake(options?: CallOptions): ResultAsync>;\n /** Query whether the host supports a specific feature. */\n featureSupported(request: T.HostFeatureSupportedRequest, options?: CallOptions): ResultAsync>;\n /**\n * Request the host to open a URL.\n *\n * An `http` or `https` URL outside the ecosystem needs a\n * `RemotePermission::Remote` grant for the target host, and prompts for one\n * on first use. dotNS names, `localhost`, and the app-handoff schemes\n * (`mailto:`, `tel:`, `polkadot:`, `dot:`) consume no grant. The grant is\n * per host and shared with outbound data access to that host, so approving\n * one covers the other.\n */\n navigateTo(request: T.HostNavigateToRequest, options?: CallOptions): ResultAsync>;\n /**\n * Report the host's identity and version.\n *\n * Returns the host's platform, name, and version so a product knows\n * exactly which host \u2014 and which build of it \u2014 is running it: for\n * adapting to the host, telemetry, and attributing behaviour to a\n * concrete build in diagnostics and bug reports.\n */\n info(options?: CallOptions): ResultAsync>;\n /** Return the product context bound to the current host runtime. */\n getProductContext(options?: CallOptions): ResultAsync>;\n}\n/** Host theme subscription. */\nexport declare class ThemeClient {\n #private;\n constructor(transport: TrUApiTransport);\n /** Subscribe to host theme changes. */\n subscribe(): ObservableLike>;\n}\n/**\n * Worker background-operation APIs.\n *\n * The host keeps a product's worker running while it holds at least one open\n * operation, which is how a worker outlives the surface that started it.\n */\nexport declare class WorkerClient {\n #private;\n constructor(transport: TrUApiTransport);\n /** Begin a pending operation. */\n beginOperation(request: T.HostWorkerBeginOperationRequest, options?: CallOptions): ResultAsync>;\n /**\n * End a pending operation. Idempotent: an unknown or already-ended id\n * succeeds, so a retry after an ambiguous failure is safe.\n */\n endOperation(request: T.HostWorkerEndOperationRequest, options?: CallOptions): ResultAsync>;\n}\nexport interface TrUApiClient {\n readonly account: AccountClient;\n readonly chain: ChainClient;\n readonly chat: ChatClient;\n readonly coinPayment: CoinPaymentClient;\n readonly contacts: ContactsClient;\n readonly entropy: EntropyClient;\n readonly jamPeerTransport: JamPeerTransportClient;\n readonly localStorage: LocalStorageClient;\n readonly locale: LocaleClient;\n readonly notifications: NotificationsClient;\n readonly payment: PaymentClient;\n readonly permissions: PermissionsClient;\n readonly pocket: PocketClient;\n readonly preimage: PreimageClient;\n readonly renderer: RendererClient;\n readonly resourceAllocation: ResourceAllocationClient;\n readonly signing: SigningClient;\n readonly statementStore: StatementStoreClient;\n readonly system: SystemClient;\n readonly theme: ThemeClient;\n readonly worker: WorkerClient;\n}\nexport type Client = TrUApiClient;\n/** Creates the generated client facade by binding each service namespace to the\n * shared transport instance. */\nexport declare function createClient(transport: TrUApiTransport): TrUApiClient;\n\n\n// development.d.ts\n/** Same as `HostAccountCreateProofRequest`, with the 32-byte context given raw. */\nexport interface DevelopmentCreateProofRequest extends Omit {\n /** The exact 32 bytes the proof is bound to, as `0x`-prefixed hex. */\n context: HexString;\n}\n/**\n * `account.createAccountProof` with a verbatim 32-byte proof context instead of\n * a product-namespaced one.\n *\n */\nexport declare function development_createAccountProof(client: Pick, request: DevelopmentCreateProofRequest): ResultAsync>;\n"; diff --git a/vendor/truapi/dist/playground/codegen/truapi-dts.js b/vendor/truapi/dist/playground/codegen/truapi-dts.js index 36ec0e58..d610af9c 100644 --- a/vendor/truapi/dist/playground/codegen/truapi-dts.js +++ b/vendor/truapi/dist/playground/codegen/truapi-dts.js @@ -1812,6 +1812,174 @@ export type VersionedHostInfoResponse = value: HostInfo; }; export const VersionedHostInfoResponse: Codec; +/** Versioned envelope for [\`HostJamPeerTransportCloseError\`]. */ +export type VersionedHostJamPeerTransportCloseError = +/** Version 1 payload. */ +{ + tag: "V1"; + value: HostJamPeerTransportCloseError; +}; +export const VersionedHostJamPeerTransportCloseError: Codec; +/** Versioned envelope for [\`HostJamPeerTransportCloseRequest\`]. */ +export type VersionedHostJamPeerTransportCloseRequest = +/** Version 1 payload. */ +{ + tag: "V1"; + value: HostJamPeerTransportCloseRequest; +}; +export const VersionedHostJamPeerTransportCloseRequest: Codec; +/** Versioned envelope for [\`HostJamPeerTransportCloseResponse\`]. */ +export type VersionedHostJamPeerTransportCloseResponse = +/** Version 1 (no payload). */ +{ + tag: "V1"; + value?: undefined; +}; +export const VersionedHostJamPeerTransportCloseResponse: Codec; +/** Versioned envelope for [\`HostJamPeerTransportDialError\`]. */ +export type VersionedHostJamPeerTransportDialError = +/** Version 1 payload. */ +{ + tag: "V1"; + value: HostJamPeerTransportDialError; +}; +export const VersionedHostJamPeerTransportDialError: Codec; +/** Versioned envelope for [\`HostJamPeerTransportDialRequest\`]. */ +export type VersionedHostJamPeerTransportDialRequest = +/** Version 1 payload. */ +{ + tag: "V1"; + value: HostJamPeerTransportDialRequest; +}; +export const VersionedHostJamPeerTransportDialRequest: Codec; +/** Versioned envelope for [\`HostJamPeerTransportDialResponse\`]. */ +export type VersionedHostJamPeerTransportDialResponse = +/** Version 1 payload. */ +{ + tag: "V1"; + value: HostJamPeerTransportDialResponse; +}; +export const VersionedHostJamPeerTransportDialResponse: Codec; +/** Versioned envelope for [\`HostJamPeerTransportEventsError\`]. */ +export type VersionedHostJamPeerTransportEventsError = +/** Version 1 payload. */ +{ + tag: "V1"; + value: HostJamPeerTransportEventsError; +}; +export const VersionedHostJamPeerTransportEventsError: Codec; +/** Versioned envelope for [\`HostJamPeerTransportEventsRequest\`]. */ +export type VersionedHostJamPeerTransportEventsRequest = +/** Version 1 (no payload). */ +{ + tag: "V1"; + value?: undefined; +}; +export const VersionedHostJamPeerTransportEventsRequest: Codec; +/** Versioned envelope for [\`HostJamPeerTransportEventsResponse\`]. */ +export type VersionedHostJamPeerTransportEventsResponse = +/** Version 1 payload. */ +{ + tag: "V1"; + value: HostJamPeerTransportEventsResponse; +}; +export const VersionedHostJamPeerTransportEventsResponse: Codec; +/** Versioned envelope for [\`HostJamPeerTransportOpenError\`]. */ +export type VersionedHostJamPeerTransportOpenError = +/** Version 1 payload. */ +{ + tag: "V1"; + value: HostJamPeerTransportOpenError; +}; +export const VersionedHostJamPeerTransportOpenError: Codec; +/** Versioned envelope for [\`HostJamPeerTransportOpenRequest\`]. */ +export type VersionedHostJamPeerTransportOpenRequest = +/** Version 1 payload. */ +{ + tag: "V1"; + value: HostJamPeerTransportOpenRequest; +}; +export const VersionedHostJamPeerTransportOpenRequest: Codec; +/** Versioned envelope for [\`HostJamPeerTransportOpenResponse\`]. */ +export type VersionedHostJamPeerTransportOpenResponse = +/** Version 1 payload. */ +{ + tag: "V1"; + value: HostJamPeerTransportOpenResponse; +}; +export const VersionedHostJamPeerTransportOpenResponse: Codec; +/** Versioned envelope for [\`HostJamPeerTransportRecvError\`]. */ +export type VersionedHostJamPeerTransportRecvError = +/** Version 1 payload. */ +{ + tag: "V1"; + value: HostJamPeerTransportRecvError; +}; +export const VersionedHostJamPeerTransportRecvError: Codec; +/** Versioned envelope for [\`HostJamPeerTransportRecvRequest\`]. */ +export type VersionedHostJamPeerTransportRecvRequest = +/** Version 1 payload. */ +{ + tag: "V1"; + value: HostJamPeerTransportRecvRequest; +}; +export const VersionedHostJamPeerTransportRecvRequest: Codec; +/** Versioned envelope for [\`HostJamPeerTransportRecvResponse\`]. */ +export type VersionedHostJamPeerTransportRecvResponse = +/** Version 1 payload. */ +{ + tag: "V1"; + value: HostJamPeerTransportRecvResponse; +}; +export const VersionedHostJamPeerTransportRecvResponse: Codec; +/** Versioned envelope for [\`HostJamPeerTransportResetError\`]. */ +export type VersionedHostJamPeerTransportResetError = +/** Version 1 payload. */ +{ + tag: "V1"; + value: HostJamPeerTransportResetError; +}; +export const VersionedHostJamPeerTransportResetError: Codec; +/** Versioned envelope for [\`HostJamPeerTransportResetRequest\`]. */ +export type VersionedHostJamPeerTransportResetRequest = +/** Version 1 payload. */ +{ + tag: "V1"; + value: HostJamPeerTransportResetRequest; +}; +export const VersionedHostJamPeerTransportResetRequest: Codec; +/** Versioned envelope for [\`HostJamPeerTransportResetResponse\`]. */ +export type VersionedHostJamPeerTransportResetResponse = +/** Version 1 (no payload). */ +{ + tag: "V1"; + value?: undefined; +}; +export const VersionedHostJamPeerTransportResetResponse: Codec; +/** Versioned envelope for [\`HostJamPeerTransportSendError\`]. */ +export type VersionedHostJamPeerTransportSendError = +/** Version 1 payload. */ +{ + tag: "V1"; + value: HostJamPeerTransportSendError; +}; +export const VersionedHostJamPeerTransportSendError: Codec; +/** Versioned envelope for [\`HostJamPeerTransportSendRequest\`]. */ +export type VersionedHostJamPeerTransportSendRequest = +/** Version 1 payload. */ +{ + tag: "V1"; + value: HostJamPeerTransportSendRequest; +}; +export const VersionedHostJamPeerTransportSendRequest: Codec; +/** Versioned envelope for [\`HostJamPeerTransportSendResponse\`]. */ +export type VersionedHostJamPeerTransportSendResponse = +/** Version 1 (no payload). */ +{ + tag: "V1"; + value?: undefined; +}; +export const VersionedHostJamPeerTransportSendResponse: Codec; /** Versioned envelope for [\`HostLocalStorageChangeItem\`]. */ export type VersionedHostLocalStorageChangeItem = /** Version 1 payload. */ @@ -2509,6 +2677,32 @@ export type ImageSource = value: string; }; export const ImageSource: Codec; +/** Asynchronous transport notification. */ +export type JamPeerTransportEvent = +/** The connection was closed by the peer or the host. */ +{ + tag: "ConnClosed"; + value: { + conn: number; + }; +} +/** The peer finished its send side of a stream. */ + | { + tag: "StreamFin"; + value: { + stream: number; + }; +} +/** The peer opened a stream to us on a dialed connection. */ + | { + tag: "Accepted"; + value: { + conn: number; + stream: number; + kind: number; + }; +}; +export const JamPeerTransportEvent: Codec; /** * A user-imported (legacy) account: public key plus an optional user-chosen * display name. @@ -3135,8 +3329,9 @@ export const VersionedRemoteChainTransactionStopResponse: Codec; /** Versioned envelope for [\`RemotePermissionError\`]. */ @@ -4441,6 +4650,113 @@ export interface HostHandshakeRequest { codecVersion: number; } export const HostHandshakeRequest: Codec; +/** Failure to close a connection. */ +export type HostJamPeerTransportCloseError = "Closed"; +export const HostJamPeerTransportCloseError: Codec; +/** Close a connection and every stream on it. */ +export interface HostJamPeerTransportCloseRequest { + /** Connection to close. */ + conn: number; +} +export const HostJamPeerTransportCloseRequest: Codec; +/** Failure to dial a JAM peer. */ +export type HostJamPeerTransportDialError = "NotGranted" | "Refused" | "Limit" | "Unreachable"; +export const HostJamPeerTransportDialError: Codec; +/** Dial one JAM peer over JAMNP-S (QUIC) or WebTransport. */ +export interface HostJamPeerTransportDialRequest { + /** + * Genesis header hash; the host derives the ALPN from it and requires a + * \`RemotePermission::JamPeers\` grant for it. + */ + genesis: HexString; + /** Peer IP address, IPv6 or v4-mapped IPv6. */ + ip: HexString; + /** Peer UDP port. */ + port: number; + /** Ed25519 key the peer's TLS certificate must carry. */ + ed25519: HexString; + /** Compressed P-256 peer key for WebTransport certificate hashes. */ + p256?: HexString; +} +export const HostJamPeerTransportDialRequest: Codec; +/** An open connection handle. */ +export interface HostJamPeerTransportDialResponse { + /** Execution-local connection id. */ + conn: number; +} +export const HostJamPeerTransportDialResponse: Codec; +/** Failure to drain events. */ +export type HostJamPeerTransportEventsError = "NotGranted"; +export const HostJamPeerTransportEventsError: Codec; +/** Events in arrival order. */ +export interface HostJamPeerTransportEventsResponse { + /** Pending events; empty when nothing happened. */ + events: Array; +} +export const HostJamPeerTransportEventsResponse: Codec; +/** Failure to open a stream. */ +export type HostJamPeerTransportOpenError = "NotGranted" | "Closed" | "Limit"; +export const HostJamPeerTransportOpenError: Codec; +/** Open a bidirectional stream and send its kind byte. */ +export interface HostJamPeerTransportOpenRequest { + /** Connection returned by \`dial\`. */ + conn: number; + /** JAMNP-S stream kind (UP 0, CE 128, ...). */ + kind: number; +} +export const HostJamPeerTransportOpenRequest: Codec; +/** An open stream handle. */ +export interface HostJamPeerTransportOpenResponse { + /** Execution-local stream id. */ + stream: number; +} +export const HostJamPeerTransportOpenResponse: Codec; +/** Failure to receive from a stream. */ +export type HostJamPeerTransportRecvError = "Closed"; +export const HostJamPeerTransportRecvError: Codec; +/** Poll one complete framed message without blocking. */ +export interface HostJamPeerTransportRecvRequest { + /** Stream to read from. */ + stream: number; + /** Largest message the caller accepts. */ + max: number; +} +export const HostJamPeerTransportRecvRequest: Codec; +/** One unframed message, or none available yet. */ +export interface HostJamPeerTransportRecvResponse { + /** + * Complete message bytes without length prefix, or \`None\` when nothing + * has arrived yet. + */ + message?: HexString; + /** The peer finished its send side; no further messages will arrive. */ + fin: boolean; + /** The peer reset the stream; buffered data may be incomplete. */ + reset: boolean; +} +export const HostJamPeerTransportRecvResponse: Codec; +/** Failure to reset a stream. */ +export type HostJamPeerTransportResetError = "Closed"; +export const HostJamPeerTransportResetError: Codec; +/** Abort both directions of a stream. */ +export interface HostJamPeerTransportResetRequest { + /** Stream to reset. */ + stream: number; +} +export const HostJamPeerTransportResetRequest: Codec; +/** Failure to send a message. */ +export type HostJamPeerTransportSendError = "Closed" | "TooLarge" | "Limit"; +export const HostJamPeerTransportSendError: Codec; +/** Send one framed message; the host adds the \`u32\` little-endian length. */ +export interface HostJamPeerTransportSendRequest { + /** Stream returned by \`open\` or reported by an \`Accepted\` event. */ + stream: number; + /** Message bytes without length prefix. */ + message: HexString; + /** Finish the send side after this message. */ + fin: boolean; +} +export const HostJamPeerTransportSendRequest: Codec; /** A change to a subscribed storage key, pushed to the subscriber. */ export interface HostLocalStorageChangeItem { /** Value after the change. \`Some\` on write, \`None\` after clear. */ @@ -5557,6 +5873,27 @@ export import HostInfo = T.HostInfo; export import VersionedHostInfoError = T.VersionedHostInfoError; export import VersionedHostInfoRequest = T.VersionedHostInfoRequest; export import VersionedHostInfoResponse = T.VersionedHostInfoResponse; +export import VersionedHostJamPeerTransportCloseError = T.VersionedHostJamPeerTransportCloseError; +export import VersionedHostJamPeerTransportCloseRequest = T.VersionedHostJamPeerTransportCloseRequest; +export import VersionedHostJamPeerTransportCloseResponse = T.VersionedHostJamPeerTransportCloseResponse; +export import VersionedHostJamPeerTransportDialError = T.VersionedHostJamPeerTransportDialError; +export import VersionedHostJamPeerTransportDialRequest = T.VersionedHostJamPeerTransportDialRequest; +export import VersionedHostJamPeerTransportDialResponse = T.VersionedHostJamPeerTransportDialResponse; +export import VersionedHostJamPeerTransportEventsError = T.VersionedHostJamPeerTransportEventsError; +export import VersionedHostJamPeerTransportEventsRequest = T.VersionedHostJamPeerTransportEventsRequest; +export import VersionedHostJamPeerTransportEventsResponse = T.VersionedHostJamPeerTransportEventsResponse; +export import VersionedHostJamPeerTransportOpenError = T.VersionedHostJamPeerTransportOpenError; +export import VersionedHostJamPeerTransportOpenRequest = T.VersionedHostJamPeerTransportOpenRequest; +export import VersionedHostJamPeerTransportOpenResponse = T.VersionedHostJamPeerTransportOpenResponse; +export import VersionedHostJamPeerTransportRecvError = T.VersionedHostJamPeerTransportRecvError; +export import VersionedHostJamPeerTransportRecvRequest = T.VersionedHostJamPeerTransportRecvRequest; +export import VersionedHostJamPeerTransportRecvResponse = T.VersionedHostJamPeerTransportRecvResponse; +export import VersionedHostJamPeerTransportResetError = T.VersionedHostJamPeerTransportResetError; +export import VersionedHostJamPeerTransportResetRequest = T.VersionedHostJamPeerTransportResetRequest; +export import VersionedHostJamPeerTransportResetResponse = T.VersionedHostJamPeerTransportResetResponse; +export import VersionedHostJamPeerTransportSendError = T.VersionedHostJamPeerTransportSendError; +export import VersionedHostJamPeerTransportSendRequest = T.VersionedHostJamPeerTransportSendRequest; +export import VersionedHostJamPeerTransportSendResponse = T.VersionedHostJamPeerTransportSendResponse; export import VersionedHostLocalStorageChangeItem = T.VersionedHostLocalStorageChangeItem; export import VersionedHostLocalStorageClearError = T.VersionedHostLocalStorageClearError; export import VersionedHostLocalStorageClearRequest = T.VersionedHostLocalStorageClearRequest; @@ -5639,6 +5976,7 @@ export import HostWorkerOperationError = T.HostWorkerOperationError; export import ImageFit = T.ImageFit; export import ImageProps = T.ImageProps; export import ImageSource = T.ImageSource; +export import JamPeerTransportEvent = T.JamPeerTransportEvent; export import LegacyAccount = T.LegacyAccount; export import LegacyAccountTxPayload = T.LegacyAccountTxPayload; export import Modifier = T.Modifier; @@ -5804,6 +6142,23 @@ export import HostGetUserIdError = T.HostGetUserIdError; export import HostGetUserIdResponse = T.HostGetUserIdResponse; export import HostHandshakeError = T.HostHandshakeError; export import HostHandshakeRequest = T.HostHandshakeRequest; +export import HostJamPeerTransportCloseError = T.HostJamPeerTransportCloseError; +export import HostJamPeerTransportCloseRequest = T.HostJamPeerTransportCloseRequest; +export import HostJamPeerTransportDialError = T.HostJamPeerTransportDialError; +export import HostJamPeerTransportDialRequest = T.HostJamPeerTransportDialRequest; +export import HostJamPeerTransportDialResponse = T.HostJamPeerTransportDialResponse; +export import HostJamPeerTransportEventsError = T.HostJamPeerTransportEventsError; +export import HostJamPeerTransportEventsResponse = T.HostJamPeerTransportEventsResponse; +export import HostJamPeerTransportOpenError = T.HostJamPeerTransportOpenError; +export import HostJamPeerTransportOpenRequest = T.HostJamPeerTransportOpenRequest; +export import HostJamPeerTransportOpenResponse = T.HostJamPeerTransportOpenResponse; +export import HostJamPeerTransportRecvError = T.HostJamPeerTransportRecvError; +export import HostJamPeerTransportRecvRequest = T.HostJamPeerTransportRecvRequest; +export import HostJamPeerTransportRecvResponse = T.HostJamPeerTransportRecvResponse; +export import HostJamPeerTransportResetError = T.HostJamPeerTransportResetError; +export import HostJamPeerTransportResetRequest = T.HostJamPeerTransportResetRequest; +export import HostJamPeerTransportSendError = T.HostJamPeerTransportSendError; +export import HostJamPeerTransportSendRequest = T.HostJamPeerTransportSendRequest; export import HostLocalStorageChangeItem = T.HostLocalStorageChangeItem; export import HostLocalStorageClearRequest = T.HostLocalStorageClearRequest; export import V01HostLocalStorageReadError = T.V01HostLocalStorageReadError; @@ -6345,7 +6700,7 @@ export { ResultAsync, SubscriptionError }; export type { CallOptions, HostInitiatedSubscriptionHandler, ObservableLike, Observer, Result, Subscription, TrUApiTransport }; export declare const TRUAPI_VERSION: 2; export declare const TRUAPI_CODEC_VERSION: 3; -export declare const TRUAPI_WIRE_SCHEMA_HASH: "7c073d1a8c5db314"; +export declare const TRUAPI_WIRE_SCHEMA_HASH: "62e34089b454506c"; /** Account lookup, aliasing, and proof generation. */ export declare class AccountClient { #private; @@ -6531,6 +6886,40 @@ export declare class EntropyClient { /** Derive deterministic entropy. */ derive(request: T.HostDeriveEntropyRequest, options?: CallOptions): ResultAsync>; } +/** + * Host-terminated QUIC/WebTransport streams to JAM peers (JAMNP-S). + * + * The host owns TLS, certificate verification and length framing; the guest + * verifies every byte it consumes. Access is a runtime permission, not a + * manifest declaration: \`dial\` requires + * [\`RemotePermission::JamPeers\`](crate::v01::RemotePermission::JamPeers) for + * its \`genesis\`, checking the product's stored decision, prompting when it is + * undetermined and persisting the answer per product and genesis. The other + * methods act only on connections a granted \`dial\` opened. A grant is + * separate from account, signing and storage authority. + */ +export declare class JamPeerTransportClient { + #private; + constructor(transport: TrUApiTransport); + /** + * Dial one peer. The host builds the ALPN from \`genesis\` and requires the + * peer certificate to carry \`ed25519\` (QUIC) or to hash to the + * certificate derived from \`p256\` (WebTransport). + */ + dial(request: T.HostJamPeerTransportDialRequest, options?: CallOptions): ResultAsync>; + /** Open a bidirectional stream on a connection and send its kind byte. */ + open(request: T.HostJamPeerTransportOpenRequest, options?: CallOptions): ResultAsync>; + /** Queue one message; the host prepends the \`u32\` little-endian length. */ + send(request: T.HostJamPeerTransportSendRequest, options?: CallOptions): ResultAsync>; + /** Poll one complete message without blocking; the host strips the length. */ + recv(request: T.HostJamPeerTransportRecvRequest, options?: CallOptions): ResultAsync>; + /** Abort a stream in both directions. */ + reset(request: T.HostJamPeerTransportResetRequest, options?: CallOptions): ResultAsync>; + /** Close a connection and every stream on it. */ + close(request: T.HostJamPeerTransportCloseRequest, options?: CallOptions): ResultAsync>; + /** Drain connection, stream-finish and inbound-stream events. */ + events(options?: CallOptions): ResultAsync>; +} /** Local key/value storage scoped to the calling product. */ export declare class LocalStorageClient { #private; @@ -6847,6 +7236,7 @@ export interface TrUApiClient { readonly coinPayment: CoinPaymentClient; readonly contacts: ContactsClient; readonly entropy: EntropyClient; + readonly jamPeerTransport: JamPeerTransportClient; readonly localStorage: LocalStorageClient; readonly locale: LocaleClient; readonly notifications: NotificationsClient; diff --git a/vendor/truapi/package.json b/vendor/truapi/package.json index 225f0dd0..9e5f3d74 100644 --- a/vendor/truapi/package.json +++ b/vendor/truapi/package.json @@ -35,6 +35,10 @@ "types": "./dist/internal.d.ts", "import": "./dist/internal.js" }, + "./jam-peer-transport": { + "types": "./dist/jam-peer-transport.d.ts", + "import": "./dist/jam-peer-transport.js" + }, "./scale": { "types": "./dist/scale.d.ts", "import": "./dist/scale.js"