diff --git a/.changeset/browser-core-loads-verifiable.md b/.changeset/browser-core-loads-verifiable.md deleted file mode 100644 index d9e8a593fc..0000000000 --- a/.changeset/browser-core-loads-verifiable.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@parity/truapi-host": minor ---- - -Load `verifiable` on demand in the browser. The core WASM is 2.64 MiB raw and 775 KiB brotli, down from 7.76 MiB and 5.40 MiB: `verifiable` and its 4.5 MiB of powers of tau live in a separate module, `truapi_verifiable.js` and `truapi_verifiable_bg.wasm` beside the core's files in each bundle, fetched in the background once a pairing session connects, or when a ring-VRF operation first runs. Bundlers that follow `new URL(…, import.meta.url)`, such as Vite, emit both files, and a host serving a bundle directory as a whole needs no change; a host that copies individual files out of it must copy both too. diff --git a/.changeset/calm-phones-withdraw.md b/.changeset/calm-phones-withdraw.md deleted file mode 100644 index a3be2f6c4f..0000000000 --- a/.changeset/calm-phones-withdraw.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@parity/truapi-host": minor ---- - -SSO request cancellation. A pairing host whose caller withdraws a request it has published sends a `Cancel` naming it, when that request is still the newest one on the session; a host timeout sends nothing. The core's signing-host responder reads `Cancel` while it is still serving earlier requests: a running request stops at its confirmation prompt or before its next allocation step and posts no response, and one not yet started never runs. `Cancel` is appended to the SSO catalog at the next index, so a peer that predates it logs the message and serves the request as before. diff --git a/.changeset/cli-wire-debugger.md b/.changeset/cli-wire-debugger.md deleted file mode 100644 index f8d2b68290..0000000000 --- a/.changeset/cli-wire-debugger.md +++ /dev/null @@ -1,13 +0,0 @@ ---- -"@parity/truapi": minor ---- - -`truapi-host` streams product frames to a wire debugger behind `--debugger ` -(or `TRUAPI_DEBUGGER_URL`). - -The commands that serve frames, `pairing-host`, `dev` and `signing-host`, resolve the -switch before their frame listener binds, so a non-loopback URL fails startup rather -than at first dial. Each of those commands reports the outcome once as a lifecycle -event, naming the endpoint and the switch clap read it from, or saying the debugger -is off. Each accepted connection gets its own channel id, `#`, so -concurrent peers under one host do not share a trace key. diff --git a/.changeset/debugger-not-published.md b/.changeset/debugger-not-published.md deleted file mode 100644 index 8c5eee28f4..0000000000 --- a/.changeset/debugger-not-published.md +++ /dev/null @@ -1,10 +0,0 @@ ---- -"@parity/truapi-debugger": patch ---- - -The debugger is marked private, which is what it already was in practice: it has -never been published, and its README runs it from the workspace. Changesets -bumped its version with every release because it depends on the client, so the -version it declared climbed while nothing shipped, and the registry drift check -reported a published version that was missing. Publishing it later is removing -that one field. diff --git a/.changeset/host-supplied-debugger-dial.md b/.changeset/host-supplied-debugger-dial.md deleted file mode 100644 index 7c69a00a62..0000000000 --- a/.changeset/host-supplied-debugger-dial.md +++ /dev/null @@ -1,21 +0,0 @@ ---- -"@parity/truapi-host": minor ---- - -Take the wire debugger's dial from the embedding host instead of `localStorage`. - -`createWebWorkerPairingHostRuntime` accepts a `debugger` option; a dev build may carry a default in -`VITE_TRUAPI_DEBUGGER_URL`. The host's own value wins, and `null` or `""` refuses the dial outright. The dial is -resolved once at construction and cannot be changed from the page afterwards, so whether a session is observed is a -property of the build and the host rather than of anything typed into a console later. - -While a dial is live the host shows a small dev-only badge naming every endpoint frames are going to, suppressible with -`debuggerIndicator: false` for a host that renders its own. The badge belongs to the runtimes that are dialling, so an -embedder with one worker runtime per product surface can give a dial to some of them without the rest taking the badge -down. - -A dial URL must be `ws://` on `localhost`, 127.0.0.0/8 or `[::1]`, the same set the native sink accepts. An IPv4-mapped -literal such as `ws://[::ffff:127.0.0.1]` is refused. - -**Breaking for anyone enabling the debugger today:** the `truapi:debugger` `localStorage` key is no longer read, and -setting it has no effect. Pass the `debugger` option, or build with `VITE_TRUAPI_DEBUGGER_URL`. diff --git a/.changeset/permission-prompt-product-context.md b/.changeset/permission-prompt-product-context.md deleted file mode 100644 index af7de3ccb4..0000000000 --- a/.changeset/permission-prompt-product-context.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -"@parity/truapi": minor -"@parity/truapi-host": minor ---- - -The `Permissions` host callbacks name the product that asked: `devicePermission(product, request)` and -`remotePermission(product, request)` take the requesting `ProductContext` first, like the other product-scoped -callbacks, so a host can title the prompt with the product and key any grant it keeps itself by the product. Stored -decisions stay keyed by `productId` alone. - -The `truapi-host` CLI names the requesting product in its permission approvals. diff --git a/.changeset/personhood-ring-keys.md b/.changeset/personhood-ring-keys.md deleted file mode 100644 index 13897166c6..0000000000 --- a/.changeset/personhood-ring-keys.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -"@parity/truapi": patch -"@parity/truapi-host": patch ---- - -Initialize built-in personhood ring keys when an authorized product lists the personhood owner's keys, so full and lite handles are available without prior registration on the device. diff --git a/.changeset/provider-lazy-secp256k1-tables.md b/.changeset/provider-lazy-secp256k1-tables.md deleted file mode 100644 index 3135a356c0..0000000000 --- a/.changeset/provider-lazy-secp256k1-tables.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@parity/truapi-provider": patch ---- - -The browser bundle is 4.25 MiB raw and 0.94 MiB brotli, down from 5.31 MiB and 2.01 MiB. smoldot's secp256k1 multiplication tables are built the first time a runtime call uses a secp256k1 host function, in about 10 ms, instead of shipping as 1 MiB of precomputed points. diff --git a/.changeset/quiet-hands-withdraw.md b/.changeset/quiet-hands-withdraw.md deleted file mode 100644 index d9e9031079..0000000000 --- a/.changeset/quiet-hands-withdraw.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@parity/truapi-host": patch ---- - -A withdrawn request stops on the host, not only at the product. A call cancelled while its confirmation prompt is open stops waiting, and an answer given afterwards authorizes nothing. A withdrawn call never publishes its paired-host request, never sends a broadcast, statement, notification or navigation it had not yet sent, and a broadcast already sent is stopped when the node gave it an operation id. Permission prompts still finish and record their answer. Every stop reaches the product as `CallError.Cancelled`. diff --git a/CHANGELOG.md b/CHANGELOG.md index f8ff37d9cb..eb2e8ba434 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,12 +5,36 @@ All notable changes to the TrUAPI protocol are documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), generated from [Conventional Commits](https://www.conventionalcommits.org/). +## [0.21.0] - 2026-09-24 + +### Added + +- load verifiable on demand in the browser (#922) +- host-supplied wire-debugger dial, plus a make debugger target (#604) +- let a withdrawal reach the paired host that is serving it (#933) +- stop a withdrawn call before it prompts, acts or reaches another party (#927) +- pass the requesting ProductContext to permission prompts (#936) +- stream product frames to a wire debugger behind --debugger (#656) + +### Changed + +- build smoldot's secp256k1 tables on first use in the browser (#928) + +### Fixed + +- mark the debugger private, since it is not published (#911) +- initialize built-in personhood keys (#924) + ## [0.20.0] - 2026-09-23 ### Added - chat modality on the shared TrUAPI core (#840) +### Changed + +- @parity/truapi 0.20.0, @parity/truapi-host 0.20.0, @parity/ios-host 0.20.0 (#920) + ### Fixed - repair source installs and gate rustdoc (#917) diff --git a/Cargo.lock b/Cargo.lock index 35ba01afc6..b8ba30193f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -5422,7 +5422,7 @@ dependencies = [ [[package]] name = "truapi" -version = "0.20.0" +version = "0.21.0" dependencies = [ "async-trait", "derive_more 2.1.1", @@ -5449,7 +5449,7 @@ dependencies = [ [[package]] name = "truapi-host-cli" -version = "0.20.0" +version = "0.21.0" dependencies = [ "anyhow", "arboard", diff --git a/js/packages/truapi-debugger/CHANGELOG.md b/js/packages/truapi-debugger/CHANGELOG.md index 3c7137ca88..cbfe441035 100644 --- a/js/packages/truapi-debugger/CHANGELOG.md +++ b/js/packages/truapi-debugger/CHANGELOG.md @@ -1,5 +1,18 @@ # @parity/truapi-debugger +## 0.1.8 + +### Patch Changes + +- 021815d: The debugger is marked private, which is what it already was in practice: it has never been published, and + its README runs it from the workspace. Changesets bumped its version with every release because it depends on the + client, so the version it declared climbed while nothing shipped, and the registry drift check reported a published + version that was missing. Publishing it later is removing that one field. +- Updated dependencies [ffdd9b4] +- Updated dependencies [5a9f4b9] +- Updated dependencies [cf1702f] + - @parity/truapi@0.21.0 + ## 0.1.7 ### Patch Changes diff --git a/js/packages/truapi-debugger/package.json b/js/packages/truapi-debugger/package.json index e8ba93f976..f5e51d11d2 100644 --- a/js/packages/truapi-debugger/package.json +++ b/js/packages/truapi-debugger/package.json @@ -1,6 +1,6 @@ { "name": "@parity/truapi-debugger", - "version": "0.1.7", + "version": "0.1.8", "private": true, "description": "In-repo debugger consumer for TrUAPI wire frames: decodes and groups the frames the truapi-server host tap streams out", "license": "MIT", @@ -34,6 +34,6 @@ "typescript": "^6.0" }, "dependencies": { - "@parity/truapi": "^0.20.0" + "@parity/truapi": "^0.21.0" } } diff --git a/js/packages/truapi-host/CHANGELOG.md b/js/packages/truapi-host/CHANGELOG.md index 96c5c2f112..01ea781007 100644 --- a/js/packages/truapi-host/CHANGELOG.md +++ b/js/packages/truapi-host/CHANGELOG.md @@ -1,5 +1,60 @@ # @parity/truapi-host +## 0.21.0 + +### Minor Changes + +- 579f450: Load `verifiable` on demand in the browser. The core WASM is 2.64 MiB raw and 775 KiB brotli, down from 7.76 + MiB and 5.40 MiB: `verifiable` and its 4.5 MiB of powers of tau live in a separate module, `truapi_verifiable.js` and + `truapi_verifiable_bg.wasm` beside the core's files in each bundle, fetched in the background once a pairing session + connects, or when a ring-VRF operation first runs. Bundlers that follow `new URL(…, import.meta.url)`, such as Vite, + emit both files, and a host serving a bundle directory as a whole needs no change; a host that copies individual files + out of it must copy both too. +- db004aa: SSO request cancellation. A pairing host whose caller withdraws a request it has published sends a `Cancel` + naming it, when that request is still the newest one on the session; a host timeout sends nothing. The core's + signing-host responder reads `Cancel` while it is still serving earlier requests: a running request stops at its + confirmation prompt or before its next allocation step and posts no response, and one not yet started never runs. + `Cancel` is appended to the SSO catalog at the next index, so a peer that predates it logs the message and serves the + request as before. +- 0e56d37: Take the wire debugger's dial from the embedding host instead of `localStorage`. + + `createWebWorkerPairingHostRuntime` accepts a `debugger` option; a dev build may carry a default in + `VITE_TRUAPI_DEBUGGER_URL`. The host's own value wins, and `null` or `""` refuses the dial outright. The dial is + resolved once at construction and cannot be changed from the page afterwards, so whether a session is observed is a + property of the build and the host rather than of anything typed into a console later. + + While a dial is live the host shows a small dev-only badge naming every endpoint frames are going to, suppressible + with `debuggerIndicator: false` for a host that renders its own. The badge belongs to the runtimes that are dialling, + so an embedder with one worker runtime per product surface can give a dial to some of them without the rest taking the + badge down. + + A dial URL must be `ws://` on `localhost`, 127.0.0.0/8 or `[::1]`, the same set the native sink accepts. An + IPv4-mapped literal such as `ws://[::ffff:127.0.0.1]` is refused. + + **Breaking for anyone enabling the debugger today:** the `truapi:debugger` `localStorage` key is no longer read, and + setting it has no effect. Pass the `debugger` option, or build with `VITE_TRUAPI_DEBUGGER_URL`. + +- 5a9f4b9: The `Permissions` host callbacks name the product that asked: `devicePermission(product, request)` and + `remotePermission(product, request)` take the requesting `ProductContext` first, like the other product-scoped + callbacks, so a host can title the prompt with the product and key any grant it keeps itself by the product. Stored + decisions stay keyed by `productId` alone. + + The `truapi-host` CLI names the requesting product in its permission approvals. + +### Patch Changes + +- cf1702f: Initialize built-in personhood ring keys when an authorized product lists the personhood owner's keys, so + full and lite handles are available without prior registration on the device. +- dadcabd: A withdrawn request stops on the host, not only at the product. A call cancelled while its confirmation + prompt is open stops waiting, and an answer given afterwards authorizes nothing. A withdrawn call never publishes its + paired-host request, never sends a broadcast, statement, notification or navigation it had not yet sent, and a + broadcast already sent is stopped when the node gave it an operation id. Permission prompts still finish and record + their answer. Every stop reaches the product as `CallError.Cancelled`. +- Updated dependencies [ffdd9b4] +- Updated dependencies [5a9f4b9] +- Updated dependencies [cf1702f] + - @parity/truapi@0.21.0 + ## 0.20.0 ### Patch Changes diff --git a/js/packages/truapi-host/package.json b/js/packages/truapi-host/package.json index b0eb5b6c58..f6b6483961 100644 --- a/js/packages/truapi-host/package.json +++ b/js/packages/truapi-host/package.json @@ -1,6 +1,6 @@ { "name": "@parity/truapi-host", - "version": "0.20.0", + "version": "0.21.0", "description": "WASM-backed TrUAPI host runtime: embeds the Rust core, with web iframe and Web Worker entry points", "license": "MIT", "author": "Parity Technologies ", @@ -86,7 +86,7 @@ }, "dependencies": { "@noble/hashes": "^2.2.0", - "@parity/truapi": "^0.20.0", + "@parity/truapi": "^0.21.0", "neverthrow": "^8.2.0" }, "devDependencies": { diff --git a/js/packages/truapi-provider/CHANGELOG.md b/js/packages/truapi-provider/CHANGELOG.md index a674883e01..dedd1d2d86 100644 --- a/js/packages/truapi-provider/CHANGELOG.md +++ b/js/packages/truapi-provider/CHANGELOG.md @@ -1,5 +1,13 @@ # @parity/truapi-provider +## 0.2.2 + +### Patch Changes + +- a8fd3a0: The browser bundle is 4.25 MiB raw and 0.94 MiB brotli, down from 5.31 MiB and 2.01 MiB. smoldot's secp256k1 + multiplication tables are built the first time a runtime call uses a secp256k1 host function, in about 10 ms, instead + of shipping as 1 MiB of precomputed points. + ## 0.2.1 ### Patch Changes diff --git a/js/packages/truapi-provider/package.json b/js/packages/truapi-provider/package.json index d5ad69c9a0..dfe69920bc 100644 --- a/js/packages/truapi-provider/package.json +++ b/js/packages/truapi-provider/package.json @@ -1,6 +1,6 @@ { "name": "@parity/truapi-provider", - "version": "0.2.1", + "version": "0.2.2", "description": "Network provider backends for the TrUAPI ChainProvider: an embedded smoldot light client and remote WebSocket JSON-RPC nodes, compiled to WebAssembly for browser hosts", "license": "MIT AND Apache-2.0", "author": "Parity Technologies ", diff --git a/js/packages/truapi/CHANGELOG.md b/js/packages/truapi/CHANGELOG.md index 8640b1d556..2db14b0f32 100644 --- a/js/packages/truapi/CHANGELOG.md +++ b/js/packages/truapi/CHANGELOG.md @@ -1,5 +1,30 @@ # @parity/truapi +## 0.21.0 + +### Minor Changes + +- ffdd9b4: `truapi-host` streams product frames to a wire debugger behind `--debugger ` (or + `TRUAPI_DEBUGGER_URL`). + + The commands that serve frames, `pairing-host`, `dev` and `signing-host`, resolve the switch before their frame + listener binds, so a non-loopback URL fails startup rather than at first dial. Each of those commands reports the + outcome once as a lifecycle event, naming the endpoint and the switch clap read it from, or saying the debugger is + off. Each accepted connection gets its own channel id, `#`, so concurrent peers under one host do not + share a trace key. + +- 5a9f4b9: The `Permissions` host callbacks name the product that asked: `devicePermission(product, request)` and + `remotePermission(product, request)` take the requesting `ProductContext` first, like the other product-scoped + callbacks, so a host can title the prompt with the product and key any grant it keeps itself by the product. Stored + decisions stay keyed by `productId` alone. + + The `truapi-host` CLI names the requesting product in its permission approvals. + +### Patch Changes + +- cf1702f: Initialize built-in personhood ring keys when an authorized product lists the personhood owner's keys, so + full and lite handles are available without prior registration on the device. + ## 0.20.0 ### Minor Changes diff --git a/js/packages/truapi/package.json b/js/packages/truapi/package.json index 851e67bb7d..95f4354e5a 100644 --- a/js/packages/truapi/package.json +++ b/js/packages/truapi/package.json @@ -1,6 +1,6 @@ { "name": "@parity/truapi", - "version": "0.20.0", + "version": "0.21.0", "description": "TrUAPI TypeScript transport, SCALE codecs, and generated API client", "license": "MIT", "author": "Parity Technologies ", diff --git a/js/packages/truapi/src/explorer/codegen/versions/0.21.0/services.ts b/js/packages/truapi/src/explorer/codegen/versions/0.21.0/services.ts new file mode 100644 index 0000000000..6f8b409016 --- /dev/null +++ b/js/packages/truapi/src/explorer/codegen/versions/0.21.0/services.ts @@ -0,0 +1,998 @@ +// Auto-generated by truapi-codegen. Do not edit. +import type { ServiceInfo } from "../../../../playground/services-types.js"; + +export const services: ServiceInfo[] = [ + { + name: "Account", + methods: [ + { + name: "connection_status_subscribe", + type: "subscription", + signature: + "connectionStatusSubscribe(): ObservableLike>", + docUrl: + "api/account/trait.Account.html#method.connection_status_subscribe", + description: "Subscribe to account connection status changes.", + responseType: "host-account-connection-status-subscribe-item", + }, + { + name: "get_account", + type: "unary", + signature: + "getAccount(request: HostAccountGetRequest): Promise>>", + docUrl: "api/account/trait.Account.html#method.get_account", + description: "Retrieve a product-scoped account.", + requestDescription: "HostAccountGetRequest", + requestType: "host-account-get-request", + responseType: "host-account-get-response", + }, + { + name: "get_account_alias", + type: "unary", + signature: + "getAccountAlias(request: HostAccountGetAliasRequest): Promise>>", + docUrl: "api/account/trait.Account.html#method.get_account_alias", + description: "Retrieve the contextual alias for a context and ring.", + requestDescription: "HostAccountGetAliasRequest", + requestType: "host-account-get-alias-request", + responseType: "contextual-alias", + }, + { + name: "create_account_proof", + type: "unary", + signature: + "createAccountProof(request: HostAccountCreateProofRequest): Promise>>", + docUrl: "api/account/trait.Account.html#method.create_account_proof", + description: + "Generate a ring VRF proof with an explicitly registered member key.", + requestDescription: "HostAccountCreateProofRequest", + requestType: "host-account-create-proof-request", + responseType: "host-account-create-proof-response", + }, + { + name: "get_legacy_accounts", + type: "unary", + signature: + "getLegacyAccounts(): Promise>>", + docUrl: "api/account/trait.Account.html#method.get_legacy_accounts", + description: + "List non-product accounts the user owns.\n\nCurrent hosts do not expose non-product accounts, so the list is empty.", + responseType: "host-get-legacy-accounts-response", + }, + { + name: "get_user_id", + type: "unary", + signature: + "getUserId(): Promise>>", + docUrl: "api/account/trait.Account.html#method.get_user_id", + description: "Fetch the user's primary identity.", + responseType: "host-get-user-id-response", + }, + { + name: "request_login", + type: "unary", + signature: + "requestLogin(request: HostRequestLoginRequest): Promise>>", + docUrl: "api/account/trait.Account.html#method.request_login", + description: + 'Request the host to present the login flow to the user.\n\nProducts should call this in response to a user action (e.g. tapping a\n"Sign in" button), not automatically on load.', + requestDescription: "HostRequestLoginRequest", + requestType: "host-request-login-request", + responseType: "host-request-login-response", + }, + { + name: "sign_vrf", + type: "unary", + signature: + "signVrf(request: HostAccountSignVrfRequest): Promise>>", + docUrl: "api/account/trait.Account.html#method.sign_vrf", + description: + "Produce an sr25519 (schnorrkel) VRF signature from a product account.\n\nThe host builds a Merlin transcript from `transcriptLabel` and `items`\nand signs it with the account's key, returning the VRF pre-output and\nproof. Authorized like signing: local when `AutoSigning` covers the\naccount, otherwise a per-call user confirmation.", + requestDescription: "HostAccountSignVrfRequest", + requestType: "host-account-sign-vrf-request", + responseType: "vrf-signature", + }, + { + name: "register_ring_vrf_key", + type: "unary", + signature: + "registerRingVrfKey(request: HostAccountRegisterRingVrfKeyRequest): Promise>>", + docUrl: "api/account/trait.Account.html#method.register_ring_vrf_key", + description: "Register a ring-VRF key owned by the calling product.", + requestDescription: "HostAccountRegisterRingVrfKeyRequest", + requestType: "host-account-register-ring-vrf-key-request", + responseType: "ring-vrf-public-key", + }, + { + name: "list_ring_vrf_keys", + type: "unary", + signature: + "listRingVrfKeys(request: HostAccountListRingVrfKeysRequest): Promise, S.CallErrorValue>>", + docUrl: "api/account/trait.Account.html#method.list_ring_vrf_keys", + description: "List registered ring-VRF keys owned by a product.", + requestDescription: "HostAccountListRingVrfKeysRequest", + requestType: "host-account-list-ring-vrf-keys-request", + }, + { + name: "ring_vrf_sign", + type: "unary", + signature: + "ringVrfSign(request: HostAccountRingVrfSignRequest): Promise>>", + docUrl: "api/account/trait.Account.html#method.ring_vrf_sign", + description: + "Sign bytes directly with a registered ring-VRF member key.", + requestDescription: "HostAccountRingVrfSignRequest", + requestType: "host-account-ring-vrf-sign-request", + }, + ], + }, + { + name: "Chain", + methods: [ + { + name: "follow_head_subscribe", + type: "subscription", + signature: + "followHeadSubscribe(request: RemoteChainHeadFollowRequest): ObservableLike>", + docUrl: "api/chain/trait.Chain.html#method.follow_head_subscribe", + description: "Follow the chain head and receive block events.", + requestDescription: "RemoteChainHeadFollowRequest", + requestType: "remote-chain-head-follow-request", + responseType: "remote-chain-head-follow-item", + }, + { + name: "get_head_header", + type: "unary", + signature: + "getHeadHeader(request: RemoteChainHeadHeaderRequest): Promise>>", + docUrl: "api/chain/trait.Chain.html#method.get_head_header", + description: "Fetch a block header.", + requestDescription: "RemoteChainHeadHeaderRequest", + requestType: "remote-chain-head-header-request", + responseType: "remote-chain-head-header-response", + }, + { + name: "get_head_body", + type: "unary", + signature: + "getHeadBody(request: RemoteChainHeadBodyRequest): Promise>>", + docUrl: "api/chain/trait.Chain.html#method.get_head_body", + description: "Fetch a block body.", + requestDescription: "RemoteChainHeadBodyRequest", + requestType: "remote-chain-head-body-request", + responseType: "remote-chain-head-body-response", + }, + { + name: "get_head_storage", + type: "unary", + signature: + "getHeadStorage(request: RemoteChainHeadStorageRequest): Promise>>", + docUrl: "api/chain/trait.Chain.html#method.get_head_storage", + description: "Query runtime storage at a specific block.", + requestDescription: "RemoteChainHeadStorageRequest", + requestType: "remote-chain-head-storage-request", + responseType: "remote-chain-head-storage-response", + }, + { + name: "call_head", + type: "unary", + signature: + "callHead(request: RemoteChainHeadCallRequest): Promise>>", + docUrl: "api/chain/trait.Chain.html#method.call_head", + description: "Invoke a runtime call at a specific block.", + requestDescription: "RemoteChainHeadCallRequest", + requestType: "remote-chain-head-call-request", + responseType: "remote-chain-head-call-response", + }, + { + name: "unpin_head", + type: "unary", + signature: + "unpinHead(request: RemoteChainHeadUnpinRequest): Promise>>", + docUrl: "api/chain/trait.Chain.html#method.unpin_head", + description: "Release pinned blocks.", + requestDescription: "RemoteChainHeadUnpinRequest", + requestType: "remote-chain-head-unpin-request", + }, + { + name: "continue_head", + type: "unary", + signature: + "continueHead(request: RemoteChainHeadContinueRequest): Promise>>", + docUrl: "api/chain/trait.Chain.html#method.continue_head", + description: "Continue a paused chain-head operation.", + requestDescription: "RemoteChainHeadContinueRequest", + requestType: "remote-chain-head-continue-request", + }, + { + name: "stop_head_operation", + type: "unary", + signature: + "stopHeadOperation(request: RemoteChainHeadStopOperationRequest): Promise>>", + docUrl: "api/chain/trait.Chain.html#method.stop_head_operation", + description: "Stop a chain-head operation.", + requestDescription: "RemoteChainHeadStopOperationRequest", + requestType: "remote-chain-head-stop-operation-request", + }, + { + name: "get_spec_genesis_hash", + type: "unary", + signature: + "getSpecGenesisHash(request: RemoteChainSpecGenesisHashRequest): Promise>>", + docUrl: "api/chain/trait.Chain.html#method.get_spec_genesis_hash", + description: "Fetch the canonical genesis hash for a chain.", + requestDescription: "RemoteChainSpecGenesisHashRequest", + requestType: "remote-chain-spec-genesis-hash-request", + responseType: "remote-chain-spec-genesis-hash-response", + }, + { + name: "get_spec_chain_name", + type: "unary", + signature: + "getSpecChainName(request: RemoteChainSpecChainNameRequest): Promise>>", + docUrl: "api/chain/trait.Chain.html#method.get_spec_chain_name", + description: "Fetch the display name of a chain.", + requestDescription: "RemoteChainSpecChainNameRequest", + requestType: "remote-chain-spec-chain-name-request", + responseType: "remote-chain-spec-chain-name-response", + }, + { + name: "get_spec_properties", + type: "unary", + signature: + "getSpecProperties(request: RemoteChainSpecPropertiesRequest): Promise>>", + docUrl: "api/chain/trait.Chain.html#method.get_spec_properties", + description: "Fetch the JSON-encoded properties of a chain.", + requestDescription: "RemoteChainSpecPropertiesRequest", + requestType: "remote-chain-spec-properties-request", + responseType: "remote-chain-spec-properties-response", + }, + { + name: "broadcast_transaction", + type: "unary", + signature: + "broadcastTransaction(request: RemoteChainTransactionBroadcastRequest): Promise>>", + docUrl: "api/chain/trait.Chain.html#method.broadcast_transaction", + description: "Broadcast a signed transaction.", + requestDescription: "RemoteChainTransactionBroadcastRequest", + requestType: "remote-chain-transaction-broadcast-request", + responseType: "remote-chain-transaction-broadcast-response", + }, + { + name: "stop_transaction", + type: "unary", + signature: + "stopTransaction(request: RemoteChainTransactionStopRequest): Promise>>", + docUrl: "api/chain/trait.Chain.html#method.stop_transaction", + description: "Stop a transaction broadcast.", + requestDescription: "RemoteChainTransactionStopRequest", + requestType: "remote-chain-transaction-stop-request", + }, + { + name: "get_chain_info", + type: "unary", + signature: + "getChainInfo(request: RemoteChainInfoRequest): Promise>>", + docUrl: "api/chain/trait.Chain.html#method.get_chain_info", + description: + "Resolve a chain identifier to its genesis hash against the host's\nconfigured environment (RFC 0026).", + requestDescription: "RemoteChainInfoRequest", + requestType: "remote-chain-info-request", + responseType: "remote-chain-info-response", + }, + ], + }, + { + name: "Chat", + requiredExecution: "Worker", + methods: [ + { + name: "create_room", + type: "unary", + signature: + "createRoom(request: HostChatCreateRoomRequest): Promise>>", + docUrl: "api/chat/trait.Chat.html#method.create_room", + description: "Create a chat room.", + requestDescription: "HostChatCreateRoomRequest", + requestType: "host-chat-create-room-request", + responseType: "host-chat-create-room-response", + }, + { + name: "register_bot", + type: "unary", + signature: + "registerBot(request: HostChatRegisterBotRequest): Promise>>", + docUrl: "api/chat/trait.Chat.html#method.register_bot", + description: "Register a chat bot.", + requestDescription: "HostChatRegisterBotRequest", + requestType: "host-chat-register-bot-request", + responseType: "host-chat-register-bot-response", + }, + { + name: "list_subscribe", + type: "subscription", + signature: + "listSubscribe(): ObservableLike>", + docUrl: "api/chat/trait.Chat.html#method.list_subscribe", + description: "Subscribe to the list of chat rooms.", + responseType: "host-chat-list-subscribe-item", + }, + { + name: "post_message", + type: "unary", + signature: + "postMessage(request: HostChatPostMessageRequest): Promise>>", + docUrl: "api/chat/trait.Chat.html#method.post_message", + description: + "Post a message to a chat room.\n\nThe host bounds and screens what it forwards. Message text is capped at\n16 KiB and keeps line breaks and tabs, but is rejected for other\ncontrol characters and for bidirectional overrides. Identifiers and\ndisplay names are normalized and screened. A message carries at most 32\nactions and 32 media items, a custom payload at most 256 KiB, and a URL\nat most 2 KiB which must be `https` or an inline raster image. A\nrejection reports `MessageTooLarge` when the body or custom payload is\nover budget, and `Unknown` with a reason naming the field otherwise.\n\nThe returned `messageId` is the correlation key for any action the\nmessage carries: a later `actionSubscribe` trigger names it.", + requestDescription: "HostChatPostMessageRequest", + requestType: "host-chat-post-message-request", + responseType: "host-chat-post-message-response", + }, + { + name: "action_subscribe", + type: "subscription", + signature: + "actionSubscribe(): ObservableLike>", + docUrl: "api/chat/trait.Chat.html#method.action_subscribe", + description: "Subscribe to received chat actions.", + responseType: "host-chat-action-subscribe-item", + }, + ], + }, + { + name: "Coin Payment", + methods: [ + { + name: "create_purse", + type: "unary", + signature: + "createPurse(request: HostCoinPaymentCreatePurseRequest): Promise>>", + docUrl: "api/coin_payment/trait.CoinPayment.html#method.create_purse", + description: "Create a new firewalled CoinPayment purse.", + requestDescription: "HostCoinPaymentCreatePurseRequest", + requestType: "host-coin-payment-create-purse-request", + responseType: "host-coin-payment-create-purse-response", + }, + { + name: "query_purse", + type: "unary", + signature: + "queryPurse(request: HostCoinPaymentQueryPurseRequest): Promise>>", + docUrl: "api/coin_payment/trait.CoinPayment.html#method.query_purse", + description: "Query product-visible purse metadata and balance.", + requestDescription: "HostCoinPaymentQueryPurseRequest", + requestType: "host-coin-payment-query-purse-request", + responseType: "host-coin-payment-query-purse-response", + }, + { + name: "rebalance_purse", + type: "subscription", + signature: + "rebalancePurse(request: HostCoinPaymentRebalancePurseRequest): ObservableLike>", + docUrl: + "api/coin_payment/trait.CoinPayment.html#method.rebalance_purse", + description: "Transfer balance between local purses.", + requestDescription: "HostCoinPaymentRebalancePurseRequest", + requestType: "host-coin-payment-rebalance-purse-request", + responseType: "coin-payment-status", + }, + { + name: "delete_purse", + type: "subscription", + signature: + "deletePurse(request: HostCoinPaymentDeletePurseRequest): ObservableLike>", + docUrl: "api/coin_payment/trait.CoinPayment.html#method.delete_purse", + description: + "Delete a purse after draining its balance into another local purse.", + requestDescription: "HostCoinPaymentDeletePurseRequest", + requestType: "host-coin-payment-delete-purse-request", + responseType: "coin-payment-status", + }, + { + name: "create_receivable", + type: "unary", + signature: + "createReceivable(request: HostCoinPaymentCreateReceivableRequest): Promise>>", + docUrl: + "api/coin_payment/trait.CoinPayment.html#method.create_receivable", + description: + "Create a receivable public key for depositing into a purse.", + requestDescription: "HostCoinPaymentCreateReceivableRequest", + requestType: "host-coin-payment-create-receivable-request", + responseType: "host-coin-payment-create-receivable-response", + }, + { + name: "create_cheque", + type: "unary", + signature: + "createCheque(request: HostCoinPaymentCreateChequeRequest): Promise>>", + docUrl: "api/coin_payment/trait.CoinPayment.html#method.create_cheque", + description: + "Create a cheque paying from a local purse to a receivable.", + requestDescription: "HostCoinPaymentCreateChequeRequest", + requestType: "host-coin-payment-create-cheque-request", + responseType: "host-coin-payment-create-cheque-response", + }, + { + name: "deposit", + type: "subscription", + signature: + "deposit(request: HostCoinPaymentDepositRequest): ObservableLike>", + docUrl: "api/coin_payment/trait.CoinPayment.html#method.deposit", + description: "Claim coins from a cheque into the receivable's purse.", + requestDescription: "HostCoinPaymentDepositRequest", + requestType: "host-coin-payment-deposit-request", + responseType: "coin-payment-status", + }, + { + name: "refund", + type: "subscription", + signature: + "refund(request: HostCoinPaymentRefundRequest): ObservableLike>", + docUrl: "api/coin_payment/trait.CoinPayment.html#method.refund", + description: "Attempt to return coins associated with a receivable.", + requestDescription: "HostCoinPaymentRefundRequest", + requestType: "host-coin-payment-refund-request", + responseType: "coin-payment-status", + }, + { + name: "listen_for_payment", + type: "subscription", + signature: + "listenForPayment(request: HostCoinPaymentListenForRequest): ObservableLike>", + docUrl: + "api/coin_payment/trait.CoinPayment.html#method.listen_for_payment", + description: + "Listen for a cheque delivered through a standard transmission channel.", + requestDescription: "HostCoinPaymentListenForRequest", + requestType: "host-coin-payment-listen-for-request", + responseType: "host-coin-payment-listen-for-item", + }, + ], + }, + { + name: "Entropy", + methods: [ + { + name: "derive", + type: "unary", + signature: + "derive(request: HostDeriveEntropyRequest): Promise>>", + docUrl: "api/entropy/trait.Entropy.html#method.derive", + description: "Derive deterministic entropy.", + requestDescription: "HostDeriveEntropyRequest", + requestType: "host-derive-entropy-request", + responseType: "host-derive-entropy-response", + }, + ], + }, + { + name: "Local Storage", + methods: [ + { + name: "read", + type: "unary", + signature: + "read(request: HostLocalStorageReadRequest): Promise>>", + docUrl: "api/local_storage/trait.LocalStorage.html#method.read", + description: "Read a value by key.", + requestDescription: "HostLocalStorageReadRequest", + requestType: "host-local-storage-read-request", + responseType: "host-local-storage-read-response", + }, + { + name: "write", + type: "unary", + signature: + "write(request: HostLocalStorageWriteRequest): Promise>>", + docUrl: "api/local_storage/trait.LocalStorage.html#method.write", + description: "Write a value to a key.", + requestDescription: "HostLocalStorageWriteRequest", + requestType: "host-local-storage-write-request", + }, + { + name: "clear", + type: "unary", + signature: + "clear(request: HostLocalStorageClearRequest): Promise>>", + docUrl: "api/local_storage/trait.LocalStorage.html#method.clear", + description: "Clear a value by key.", + requestDescription: "HostLocalStorageClearRequest", + requestType: "host-local-storage-clear-request", + }, + { + name: "subscribe", + type: "subscription", + signature: + "subscribe(request: HostLocalStorageSubscribeRequest): ObservableLike>", + docUrl: "api/local_storage/trait.LocalStorage.html#method.subscribe", + description: + "Subscribe to changes of one key in the product's own storage namespace.\n\nEmits the current value immediately, then one item per later write or\nclear of the key by any of the product's runtimes. A write that leaves\nthe stored bytes unchanged emits nothing.", + requestDescription: "HostLocalStorageSubscribeRequest", + requestType: "host-local-storage-subscribe-request", + responseType: "host-local-storage-change-item", + }, + ], + }, + { + name: "Locale", + methods: [ + { + name: "subscribe", + type: "subscription", + signature: + "subscribe(): ObservableLike>", + docUrl: "api/locale/trait.Locale.html#method.subscribe", + description: "Subscribe to the host's selected locale.", + responseType: "host-locale-subscribe-item", + }, + ], + }, + { + name: "Notifications", + methods: [ + { + name: "send_push_notification", + type: "unary", + signature: + "sendPushNotification(request: HostPushNotificationRequest): Promise>>", + docUrl: + "api/notifications/trait.Notifications.html#method.send_push_notification", + description: + "Send a push notification to the user.\n\nReturns a [`NotificationId`](crate::v01::NotificationId) that can be\npassed to [`cancel_push_notification`](Self::cancel_push_notification)\nto retract a scheduled notification. When `scheduled_at` is set the host\npersists the notification across restarts and fires it through the\nplatform-native scheduler. See [RFC 0019].\n\n[RFC 0019]: https://github.com/paritytech/host-rust-core/blob/main/docs/rfcs/0019-scheduled-notifications.md", + requestDescription: "HostPushNotificationRequest", + requestType: "host-push-notification-request", + responseType: "host-push-notification-response", + }, + { + name: "cancel_push_notification", + type: "unary", + signature: + "cancelPushNotification(request: HostPushNotificationCancelRequest): Promise>>", + docUrl: + "api/notifications/trait.Notifications.html#method.cancel_push_notification", + description: + "Cancels a previously issued push notification.\n\nCancellation is idempotent: returns `Ok(())` whether the notification is\nstill pending, already fired, or was never issued. See [RFC 0019].\n\n[RFC 0019]: https://github.com/paritytech/host-rust-core/blob/main/docs/rfcs/0019-scheduled-notifications.md", + requestDescription: "HostPushNotificationCancelRequest", + requestType: "host-push-notification-cancel-request", + }, + ], + }, + { + name: "Payment", + methods: [ + { + name: "balance_subscribe", + type: "subscription", + signature: + "balanceSubscribe(request: HostPaymentBalanceSubscribeRequest): ObservableLike>", + docUrl: "api/payment/trait.Payment.html#method.balance_subscribe", + description: "Subscribe to payment balance updates.", + requestDescription: "HostPaymentBalanceSubscribeRequest", + requestType: "host-payment-balance-subscribe-request", + responseType: "host-payment-balance-subscribe-item", + }, + { + name: "top_up", + type: "unary", + signature: + "topUp(request: HostPaymentTopUpRequest): Promise>>", + docUrl: "api/payment/trait.Payment.html#method.top_up", + description: "Top up the user's payment balance.", + requestDescription: "HostPaymentTopUpRequest", + requestType: "host-payment-top-up-request", + }, + { + name: "request", + type: "unary", + signature: + "request(request: HostPaymentRequest): Promise>>", + docUrl: "api/payment/trait.Payment.html#method.request", + description: "Request a payment from the user.", + requestDescription: "HostPaymentRequest", + requestType: "host-payment-request", + responseType: "host-payment-response", + }, + { + name: "status_subscribe", + type: "subscription", + signature: + "statusSubscribe(request: HostPaymentStatusSubscribeRequest): ObservableLike>", + docUrl: "api/payment/trait.Payment.html#method.status_subscribe", + description: + "Subscribe to payment lifecycle updates for a specific payment.", + requestDescription: "HostPaymentStatusSubscribeRequest", + requestType: "host-payment-status-subscribe-request", + responseType: "host-payment-status-subscribe-item", + }, + ], + }, + { + name: "Permissions", + methods: [ + { + name: "request_device_permission", + type: "unary", + signature: + "requestDevicePermission(request: HostDevicePermissionRequest): Promise>>", + docUrl: + "api/permissions/trait.Permissions.html#method.request_device_permission", + description: "Request a device-capability permission from the user.", + requestDescription: + "Enum values: Notifications / Camera / Microphone / Bluetooth / NFC / Location / Clipboard / OpenUrl / Biometrics", + requestType: "host-device-permission-request", + responseType: "host-device-permission-response", + }, + { + name: "request_remote_permission", + type: "unary", + signature: + "requestRemotePermission(request: RemotePermissionRequest): Promise>>", + docUrl: + "api/permissions/trait.Permissions.html#method.request_remote_permission", + description: + "Request a remote-operation permission.\n\nThis example makes live requests to Frankfurter after permission is granted.", + requestDescription: "RemotePermissionRequest", + requestType: "remote-permission-request", + responseType: "remote-permission-response", + }, + ], + }, + { + name: "Pocket", + requiredExecution: "Worker", + methods: [ + { + name: "list_subscribe", + type: "subscription", + signature: + "listSubscribe(): ObservableLike>", + docUrl: "api/pocket/trait.Pocket.html#method.list_subscribe", + description: + "Subscribe to the calling product's cards.\n\nEmits the whole set on subscribe and again after every change.", + responseType: "host-pocket-list-subscribe-item", + }, + { + name: "remove_card", + type: "unary", + signature: + "removeCard(request: HostPocketRemoveCardRequest): Promise>>", + docUrl: "api/pocket/trait.Pocket.html#method.remove_card", + description: + "Remove one of the calling product's cards.\n\nRemoving a card that is not present succeeds. A privileged card is\nrefused with `Privileged`.", + requestDescription: "HostPocketRemoveCardRequest", + requestType: "host-pocket-remove-card-request", + }, + ], + }, + { + name: "Preimage", + methods: [ + { + name: "lookup_subscribe", + type: "subscription", + signature: + "lookupSubscribe(request: RemotePreimageLookupSubscribeRequest): ObservableLike>", + docUrl: "api/preimage/trait.Preimage.html#method.lookup_subscribe", + description: "Subscribe to preimage lookups for a given key.", + requestDescription: "RemotePreimageLookupSubscribeRequest", + requestType: "remote-preimage-lookup-subscribe-request", + responseType: "remote-preimage-lookup-subscribe-item", + }, + { + name: "submit", + type: "unary", + signature: + "submit(request: HexString): Promise>>", + docUrl: "api/preimage/trait.Preimage.html#method.submit", + description: + "Submit a preimage. Returns the preimage key (hash) on success.", + requestDescription: "HexString", + }, + ], + }, + { + name: "Renderer", + requiredExecution: "Worker", + methods: [ + { + name: "render", + type: "subscription", + signature: + "render(request: ProductRendererRenderRequest): ObservableLike>", + docUrl: "api/renderer/trait.Renderer.html#method.render", + hostInitiated: true, + description: + "Streams renderer trees for one product-rendered body. Each item\nreplaces the previous tree. The stream stays open while the body is\ndisplayed so the product can redraw in place.", + requestDescription: "ProductRendererRenderRequest", + requestType: "product-renderer-render-request", + responseType: "renderer-node", + }, + { + name: "action_subscribe", + type: "subscription", + signature: + "actionSubscribe(): ObservableLike>", + docUrl: "api/renderer/trait.Renderer.html#method.action_subscribe", + description: + "Subscribe to actions triggered inside this product's rendered bodies.", + responseType: "host-renderer-action-subscribe-item", + }, + ], + }, + { + name: "Resource Allocation", + methods: [ + { + name: "request", + type: "unary", + signature: + "request(request: HostRequestResourceAllocationRequest): Promise>>", + docUrl: + "api/resource_allocation/trait.ResourceAllocation.html#method.request", + description: "Request the host to pre-allocate one or more resources.", + requestDescription: "HostRequestResourceAllocationRequest", + requestType: "host-request-resource-allocation-request", + responseType: "host-request-resource-allocation-response", + }, + ], + }, + { + name: "Signing", + methods: [ + { + name: "create_transaction", + type: "unary", + signature: + "createTransaction(request: ProductAccountTxPayload): Promise>>", + docUrl: "api/signing/trait.Signing.html#method.create_transaction", + description: + "Construct a transaction for a product account.\n\nServed locally without a user confirmation when an RFC-0010 `AutoSigning`\ngrant covers the account; otherwise each call is confirmed by the user.\n\nUnder Extrinsic V5, omitting `VerifyMultiSignature` from `extensions`\nlets the host sign with the signer's key. Listing it — as `Disabled`,\nwith a proof in a later extension — encodes the given bytes verbatim and\nreturns an unsigned transaction.", + requestDescription: "ProductAccountTxPayload", + requestType: "product-account-tx-payload", + responseType: "host-create-transaction-response", + }, + { + name: "create_transaction_with_legacy_account", + type: "unary", + signature: + "createTransactionWithLegacyAccount(request: LegacyAccountTxPayload): Promise>>", + docUrl: + "api/signing/trait.Signing.html#method.create_transaction_with_legacy_account", + description: + "Construct a transaction for a non-product (legacy) account.\n\nThe V5 `VerifyMultiSignature` rule is the same as\n[`Signing::create_transaction`]: omit it and the host signs, list it and\nthe given bytes are used with no host signature.", + requestDescription: "LegacyAccountTxPayload", + requestType: "legacy-account-tx-payload", + responseType: "host-create-transaction-with-legacy-account-response", + }, + { + name: "sign_raw_with_legacy_account", + type: "unary", + signature: + "signRawWithLegacyAccount(request: HostSignRawWithLegacyAccountRequest): Promise>>", + docUrl: + "api/signing/trait.Signing.html#method.sign_raw_with_legacy_account", + description: "Sign raw bytes with a non-product account.", + requestDescription: "HostSignRawWithLegacyAccountRequest", + requestType: "host-sign-raw-with-legacy-account-request", + responseType: "host-sign-payload-response", + }, + { + name: "sign_payload_with_legacy_account", + type: "unary", + signature: + "signPayloadWithLegacyAccount(request: HostSignPayloadWithLegacyAccountRequest): Promise>>", + docUrl: + "api/signing/trait.Signing.html#method.sign_payload_with_legacy_account", + description: "Sign an extrinsic payload with a non-product account.", + requestDescription: "HostSignPayloadWithLegacyAccountRequest", + requestType: "host-sign-payload-with-legacy-account-request", + responseType: "host-sign-payload-response", + }, + { + name: "sign_raw", + type: "unary", + signature: + "signRaw(request: HostSignRawRequest): Promise>>", + docUrl: "api/signing/trait.Signing.html#method.sign_raw", + description: + "Sign raw bytes or a message.\n\nServed locally without a user confirmation when an RFC-0010 `AutoSigning`\ngrant covers the account; otherwise each call is confirmed by the user.", + requestDescription: "HostSignRawRequest", + requestType: "host-sign-raw-request", + responseType: "host-sign-payload-response", + }, + { + name: "sign_payload", + type: "unary", + signature: + "signPayload(request: HostSignPayloadRequest): Promise>>", + docUrl: "api/signing/trait.Signing.html#method.sign_payload", + description: + "Sign an extrinsic payload.\n\nServed locally without a user confirmation when an RFC-0010 `AutoSigning`\ngrant covers the account; otherwise each call is confirmed by the user.", + requestDescription: "HostSignPayloadRequest", + requestType: "host-sign-payload-request", + responseType: "host-sign-payload-response", + }, + { + name: "sign_raw_unwatermarked_deprecated", + type: "unary", + signature: + "signRawUnwatermarkedDeprecated(request: HostSignRawRequest): Promise>>", + docUrl: + "api/signing/trait.Signing.html#method.sign_raw_unwatermarked_deprecated", + description: + "Sign the supplied data without adding or removing a watermark.\n\nTemporary compatibility API for runtime ownership proofs, including the\n32-byte Resources alias used by Humanity. Payload decoding matches\nwatermarked signing, but the decoded bytes are signed exactly as supplied.\nThis permits transaction-shaped data and requires signing authorization\nand explicit user confirmation.\n\n@deprecated Temporary unwatermarked signing; migrate to watermarked signing when the runtime supports it. This API will be removed. See ", + requestDescription: "HostSignRawRequest", + requestType: "host-sign-raw-request", + responseType: "host-sign-payload-response", + }, + { + name: "sign_raw_unwatermarked_deprecated_with_legacy_account", + type: "unary", + signature: + "signRawUnwatermarkedDeprecatedWithLegacyAccount(request: HostSignRawWithLegacyAccountRequest): Promise>>", + docUrl: + "api/signing/trait.Signing.html#method.sign_raw_unwatermarked_deprecated_with_legacy_account", + description: + "Sign the supplied data without adding or removing a watermark.\n\nTemporary compatibility API for runtime ownership proofs, including the\n32-byte Resources alias used by Humanity. Payload decoding matches\nwatermarked signing, but the decoded bytes are signed exactly as supplied.\nThis permits transaction-shaped data and requires signing authorization\nand explicit user confirmation.\n\n@deprecated Temporary unwatermarked signing; migrate to watermarked signing when the runtime supports it. This API will be removed. See ", + requestDescription: "HostSignRawWithLegacyAccountRequest", + requestType: "host-sign-raw-with-legacy-account-request", + responseType: "host-sign-payload-response", + }, + ], + }, + { + name: "Statement Store", + methods: [ + { + name: "subscribe", + type: "subscription", + signature: + "subscribe(request: RemoteStatementStoreSubscribeRequest): ObservableLike>", + docUrl: + "api/statement_store/trait.StatementStore.html#method.subscribe", + description: "Subscribe to statements matching a topic filter.", + requestDescription: "RemoteStatementStoreSubscribeRequest", + requestType: "remote-statement-store-subscribe-request", + responseType: "remote-statement-store-subscribe-item", + }, + { + name: "create_proof", + type: "unary", + signature: + "createProof(request: RemoteStatementStoreCreateProofRequest): Promise>>", + docUrl: + "api/statement_store/trait.StatementStore.html#method.create_proof", + description: + "Create a proof for a statement.\n\n**Deprecated:** use [`create_proof_authorized`](Self::create_proof_authorized)\ninstead, which uses a pre-allocated allowance account and does not\nrequire a per-call signing prompt. Pairing hosts may reject this method\nwhen their signing channel cannot sign statement proof payloads exactly.", + requestDescription: "RemoteStatementStoreCreateProofRequest", + requestType: "remote-statement-store-create-proof-request", + responseType: "remote-statement-store-create-proof-response", + }, + { + name: "submit", + type: "unary", + signature: + "submit(request: SignedStatement): Promise>>", + docUrl: "api/statement_store/trait.StatementStore.html#method.submit", + description: + "Submit a signed statement to the network. The request body is the\n[`SignedStatement`](crate::v01::SignedStatement) directly (no wrapping\nstruct), matching upstream `triangle-js-sdks`.", + requestDescription: "SignedStatement", + requestType: "signed-statement", + }, + { + name: "create_proof_authorized", + type: "unary", + signature: + "createProofAuthorized(request: Statement): Promise>>", + docUrl: + "api/statement_store/trait.StatementStore.html#method.create_proof_authorized", + description: + "Create a proof for a statement using a pre-allocated allowance account,\nbypassing the per-call signing prompt.", + requestDescription: "Statement", + requestType: "statement", + responseType: "remote-statement-store-create-proof-response", + }, + ], + }, + { + name: "System", + methods: [ + { + name: "handshake", + type: "unary", + signature: + "handshake(request: HostHandshakeRequest): Promise>>", + docUrl: "api/system/trait.System.html#method.handshake", + description: "Negotiate the wire codec version with the product.", + requestDescription: "HostHandshakeRequest", + requestType: "host-handshake-request", + }, + { + name: "feature_supported", + type: "unary", + signature: + "featureSupported(request: HostFeatureSupportedRequest): Promise>>", + docUrl: "api/system/trait.System.html#method.feature_supported", + description: "Query whether the host supports a specific feature.", + requestDescription: "HostFeatureSupportedRequest", + requestType: "host-feature-supported-request", + responseType: "host-feature-supported-response", + }, + { + name: "navigate_to", + type: "unary", + signature: + "navigateTo(request: HostNavigateToRequest): Promise>>", + docUrl: "api/system/trait.System.html#method.navigate_to", + description: + "Request the host to open a URL.\n\nAn `http` or `https` URL outside the ecosystem needs a\n`RemotePermission::Remote` grant for the target host, and prompts for one\non first use. dotNS names, `localhost`, and the app-handoff schemes\n(`mailto:`, `tel:`, `polkadot:`, `dot:`) consume no grant. The grant is\nper host and shared with outbound data access to that host, so approving\none covers the other.", + requestDescription: "HostNavigateToRequest", + requestType: "host-navigate-to-request", + }, + { + name: "host_info", + type: "unary", + signature: + "info(): Promise>>", + docUrl: "api/system/trait.System.html#method.host_info", + description: + "Report the host's identity and version.\n\nReturns the host's platform, name, and version so a product knows\nexactly which host — and which build of it — is running it: for\nadapting to the host, telemetry, and attributing behaviour to a\nconcrete build in diagnostics and bug reports.", + responseType: "host-info", + }, + { + name: "get_product_context", + type: "unary", + signature: + "getProductContext(): Promise>>", + docUrl: "api/system/trait.System.html#method.get_product_context", + description: + "Return the product context bound to the current host runtime.", + responseType: "host-get-product-context-response", + }, + ], + }, + { + name: "Theme", + methods: [ + { + name: "subscribe", + type: "subscription", + signature: + "subscribe(): ObservableLike>", + docUrl: "api/theme/trait.Theme.html#method.subscribe", + description: "Subscribe to host theme changes.", + responseType: "host-theme-subscribe-item", + }, + ], + }, + { + name: "Worker", + requiredExecution: "Worker", + methods: [ + { + name: "begin_operation", + type: "unary", + signature: + "beginOperation(request: HostWorkerBeginOperationRequest): Promise>>", + docUrl: "api/worker/trait.Worker.html#method.begin_operation", + description: "Begin a pending operation.", + requestDescription: "HostWorkerBeginOperationRequest", + requestType: "host-worker-begin-operation-request", + responseType: "host-worker-begin-operation-response", + }, + { + name: "end_operation", + type: "unary", + signature: + "endOperation(request: HostWorkerEndOperationRequest): Promise>>", + docUrl: "api/worker/trait.Worker.html#method.end_operation", + description: + "End a pending operation. Idempotent: an unknown or already-ended id\nsucceeds, so a retry after an ambiguous failure is safe.", + requestDescription: "HostWorkerEndOperationRequest", + requestType: "host-worker-end-operation-request", + }, + ], + }, +]; diff --git a/js/packages/truapi/src/explorer/codegen/versions/0.21.0/types.ts b/js/packages/truapi/src/explorer/codegen/versions/0.21.0/types.ts new file mode 100644 index 0000000000..9a51168302 --- /dev/null +++ b/js/packages/truapi/src/explorer/codegen/versions/0.21.0/types.ts @@ -0,0 +1,5551 @@ +// Auto-generated by truapi-codegen. Do not edit. +import type { DataType } from "../../../data-types.js"; + +export const types: DataType[] = [ + { + id: "account-id", + name: "AccountId", + category: "transaction", + definition: "export type AccountId = HexString;", + description: + "A 32-byte raw account identifier used for legacy (non-product) accounts.", + }, + { + id: "action-trigger", + name: "ActionTrigger", + category: "chat", + definition: + "export interface ActionTrigger {\n messageId: string;\n actionId: string;\n payload?: HexString;\n}", + description: + "A press on a button the host draws for a `ChatMessageContent::Actions`\nmessage.", + fields: [ + { + name: "message_id", + type: "string", + description: + "Message containing the action, as returned by `Chat::post_message` in\n[`HostChatPostMessageResponse::message_id`].", + }, + { + name: "action_id", + type: "string", + description: "Which action was triggered.", + }, + { + name: "payload", + type: "HexString | undefined", + description: "Optional additional data.", + }, + ], + }, + { + id: "allocatable-resource", + name: "AllocatableResource", + category: "resource_allocation", + definition: + 'export type AllocatableResource =\n | { tag: "StatementStoreAllowance"; value?: undefined }\n | { tag: "BulletinAllowance"; value?: undefined }\n | { tag: "SmartContractAllowance"; value: DerivationIndex }\n | { tag: "AutoSigning"; value?: undefined }\n;', + description: + "A resource the host can pre-allocate on behalf of the product (RFC 0010).\n\nFor the slot-table allowances (`StatementStoreAllowance`,\n`BulletinAllowance`, `SmartContractAllowance`), pre-allocation is\nopportunistic and the host may also fulfil the allowance implicitly on the\nfirst submission. `AutoSigning` must be requested explicitly through this\ncall.", + variants: [ + { + name: "StatementStoreAllowance", + type: '{ tag: "StatementStoreAllowance"; value?: undefined }', + description: + "Statement Store slot allowance for the product's own allowance account.", + }, + { + name: "BulletinAllowance", + type: '{ tag: "BulletinAllowance"; value?: undefined }', + description: + "Bulletin chain slot allowance for the product's own allowance account.", + }, + { + name: "SmartContractAllowance", + type: '{ tag: "SmartContractAllowance"; value: DerivationIndex }', + description: + "Pre-warmed PGAS balance for the product account selected by this\nderivation index.", + }, + { + name: "AutoSigning", + type: '{ tag: "AutoSigning"; value?: undefined }', + description: + "Permission to sign on the product's behalf without per-call user prompts.", + }, + ], + }, + { + id: "allocation-outcome", + name: "AllocationOutcome", + category: "resource_allocation", + definition: + 'export type AllocationOutcome = "Allocated" | "Rejected" | "NotAvailable";', + description: "Outcome of allocating a single resource (RFC 0010).", + variants: [ + { + name: "Allocated", + type: '{ tag: "Allocated"; value?: undefined }', + description: "Resource is now available for use.", + }, + { + name: "Rejected", + type: '{ tag: "Rejected"; value?: undefined }', + description: "User or host refused the allocation.", + }, + { + name: "NotAvailable", + type: '{ tag: "NotAvailable"; value?: undefined }', + description: + "Host cannot provide this resource on the current chain or environment.", + }, + ], + }, + { + id: "arrangement", + name: "Arrangement", + category: "renderer", + definition: + 'export type Arrangement = "Start" | "End" | "Center" | "SpaceBetween" | "SpaceAround" | "SpaceEvenly";', + description: "Main-axis distribution of children.", + variants: [ + { + name: "Start", + type: '{ tag: "Start"; value?: undefined }', + description: "Pack children at the start.", + }, + { + name: "End", + type: '{ tag: "End"; value?: undefined }', + description: "Pack children at the end.", + }, + { + name: "Center", + type: '{ tag: "Center"; value?: undefined }', + description: "Pack children in the center.", + }, + { + name: "SpaceBetween", + type: '{ tag: "SpaceBetween"; value?: undefined }', + description: "Distribute with space between children.", + }, + { + name: "SpaceAround", + type: '{ tag: "SpaceAround"; value?: undefined }', + description: "Distribute with space around each child.", + }, + { + name: "SpaceEvenly", + type: '{ tag: "SpaceEvenly"; value?: undefined }', + description: "Distribute with equal space between and around children.", + }, + ], + }, + { + id: "background", + name: "Background", + category: "renderer", + definition: + "export interface Background {\n color: ColorToken;\n shape?: Shape;\n}", + description: "Background styling.", + fields: [ + { + name: "color", + type: "ColorToken", + description: "Background color.", + }, + { + name: "shape", + type: "Shape | undefined", + description: "Background shape.", + }, + ], + }, + { + id: "balance", + name: "Balance", + category: "payment", + definition: "export type Balance = bigint;", + description: + "Balance amount for payment operations. Interpreted according to the host's\nsingle fixed payment asset (e.g. pUSD).", + }, + { + id: "blending-mode", + name: "BlendingMode", + category: "renderer", + definition: + 'export type BlendingMode = "Normal" | "Multiply" | "Screen" | "Overlay" | "Darken" | "Lighten" | "ColorDodge" | "ColorBurn" | "HardLight" | "SoftLight" | "Difference" | "Exclusion" | "Hue" | "Saturation" | "Color" | "Luminosity";', + description: + "How a node composites with what is behind it. The values are those common\nto CSS `mix-blend-mode`, SwiftUI `BlendMode` and Compose `BlendMode`.", + variants: [ + { + name: "Normal", + type: '{ tag: "Normal"; value?: undefined }', + description: "Source over destination.", + }, + { + name: "Multiply", + type: '{ tag: "Multiply"; value?: undefined }', + description: "Multiplies source and destination.", + }, + { + name: "Screen", + type: '{ tag: "Screen"; value?: undefined }', + description: "Inverse multiply.", + }, + { + name: "Overlay", + type: '{ tag: "Overlay"; value?: undefined }', + description: "Multiply or screen depending on the destination.", + }, + { + name: "Darken", + type: '{ tag: "Darken"; value?: undefined }', + description: "Darker of source and destination.", + }, + { + name: "Lighten", + type: '{ tag: "Lighten"; value?: undefined }', + description: "Lighter of source and destination.", + }, + { + name: "ColorDodge", + type: '{ tag: "ColorDodge"; value?: undefined }', + description: "Brightens the destination to reflect the source.", + }, + { + name: "ColorBurn", + type: '{ tag: "ColorBurn"; value?: undefined }', + description: "Darkens the destination to reflect the source.", + }, + { + name: "HardLight", + type: '{ tag: "HardLight"; value?: undefined }', + description: "Multiply or screen depending on the source.", + }, + { + name: "SoftLight", + type: '{ tag: "SoftLight"; value?: undefined }', + description: "Darken or lighten depending on the source.", + }, + { + name: "Difference", + type: '{ tag: "Difference"; value?: undefined }', + description: "Absolute difference.", + }, + { + name: "Exclusion", + type: '{ tag: "Exclusion"; value?: undefined }', + description: "Difference with lower contrast.", + }, + { + name: "Hue", + type: '{ tag: "Hue"; value?: undefined }', + description: "Source hue with destination saturation and luminosity.", + }, + { + name: "Saturation", + type: '{ tag: "Saturation"; value?: undefined }', + description: "Source saturation with destination hue and luminosity.", + }, + { + name: "Color", + type: '{ tag: "Color"; value?: undefined }', + description: "Source hue and saturation with destination luminosity.", + }, + { + name: "Luminosity", + type: '{ tag: "Luminosity"; value?: undefined }', + description: "Source luminosity with destination hue and saturation.", + }, + ], + }, + { + id: "border-style", + name: "BorderStyle", + category: "renderer", + definition: + "export interface BorderStyle {\n width: Size;\n color: ColorToken;\n shape?: Shape;\n}", + description: "Border styling.", + fields: [ + { + name: "width", + type: "Size", + description: "Border width.", + }, + { + name: "color", + type: "ColorToken", + description: "Border color.", + }, + { + name: "shape", + type: "Shape | undefined", + description: "Border shape.", + }, + ], + }, + { + id: "box-props", + name: "BoxProps", + category: "renderer", + definition: + "export interface BoxProps {\n contentAlignment?: ContentAlignment;\n}", + description: "Properties of a `Box`.", + fields: [ + { + name: "content_alignment", + type: "ContentAlignment | undefined", + description: "Placement of content within the box.", + }, + ], + }, + { + id: "button-props", + name: "ButtonProps", + category: "renderer", + definition: + "export interface ButtonProps {\n text: string;\n variant?: ButtonVariant;\n enabled?: boolean;\n loading?: boolean;\n clickAction?: string;\n}", + description: "Properties of a `Button`.", + fields: [ + { + name: "text", + type: "string", + description: "Button label.", + }, + { + name: "variant", + type: "ButtonVariant | undefined", + description: "Button emphasis.", + }, + { + name: "enabled", + type: "boolean | undefined", + description: + "Whether the button accepts presses. Absent leaves the default to the host.", + }, + { + name: "loading", + type: "boolean | undefined", + description: + "Whether the button shows a loading state. A loading button accepts no\npresses. Absent leaves the default to the host.", + }, + { + name: "click_action", + type: "string | undefined", + description: + "Action triggered on press. A button without one is inert.", + }, + ], + }, + { + id: "button-variant", + name: "ButtonVariant", + category: "renderer", + definition: 'export type ButtonVariant = "Primary" | "Secondary" | "Text";', + description: "Button emphasis.", + variants: [ + { + name: "Primary", + type: '{ tag: "Primary"; value?: undefined }', + description: "Emphasized button for the primary action.", + }, + { + name: "Secondary", + type: '{ tag: "Secondary"; value?: undefined }', + description: "De-emphasized button for secondary actions.", + }, + { + name: "Text", + type: '{ tag: "Text"; value?: undefined }', + description: "Text-only button without a background.", + }, + ], + }, + { + id: "bytes-32", + name: "Bytes32", + category: "shared", + definition: "export type Bytes32 = HexString;", + description: + "A 32-byte value, passed as plain bytes on FFI surfaces. Version-neutral:\nthe FFI conversion below applies to `[u8; 32]` fields in every protocol\nversion.", + }, + { + id: "chain-identifier", + name: "ChainIdentifier", + category: "chain", + definition: + 'export type ChainIdentifier = "Relay" | "AssetHub" | "People" | "Bulletin";', + description: "Role of a chain within the host's configured environment.", + variants: [ + { + name: "Relay", + type: '{ tag: "Relay"; value?: undefined }', + description: "The relay chain.", + }, + { + name: "AssetHub", + type: '{ tag: "AssetHub"; value?: undefined }', + description: "The asset hub system chain.", + }, + { + name: "People", + type: '{ tag: "People"; value?: undefined }', + description: "The people chain.", + }, + { + name: "Bulletin", + type: '{ tag: "Bulletin"; value?: undefined }', + description: "The bulletin chain.", + }, + ], + }, + { + id: "chat-action", + name: "ChatAction", + category: "chat", + definition: + "export interface ChatAction {\n actionId: string;\n title: string;\n}", + description: "A clickable action button in a chat message.", + fields: [ + { + name: "action_id", + type: "string", + description: "Action identifier.", + }, + { + name: "title", + type: "string", + description: "Button label.", + }, + ], + }, + { + id: "chat-action-layout", + name: "ChatActionLayout", + category: "chat", + definition: 'export type ChatActionLayout = "Column" | "Grid";', + description: "Layout for action buttons.", + variants: [ + { + name: "Column", + type: '{ tag: "Column"; value?: undefined }', + description: "Buttons stacked vertically.", + }, + { + name: "Grid", + type: '{ tag: "Grid"; value?: undefined }', + description: "Buttons arranged in a grid.", + }, + ], + }, + { + id: "chat-action-payload", + name: "ChatActionPayload", + category: "chat", + definition: + 'export type ChatActionPayload =\n | { tag: "MessagePosted"; value: ChatMessageContent }\n | { tag: "ActionTriggered"; value: ActionTrigger }\n | { tag: "Command"; value: ChatCommand }\n;', + description: "Payload of a received chat action.", + variants: [ + { + name: "MessagePosted", + type: '{ tag: "MessagePosted"; value: ChatMessageContent }', + description: "A peer posted a message.", + }, + { + name: "ActionTriggered", + type: '{ tag: "ActionTriggered"; value: ActionTrigger }', + description: "A user pressed a host-drawn `Actions` button.", + }, + { + name: "Command", + type: '{ tag: "Command"; value: ChatCommand }', + description: "A user issued a command.", + }, + ], + }, + { + id: "chat-actions", + name: "ChatActions", + category: "chat", + definition: + "export interface ChatActions {\n text?: string;\n actions: Array;\n layout: ChatActionLayout;\n}", + description: "A set of action buttons with optional text.", + fields: [ + { + name: "text", + type: "string | undefined", + description: "Optional message text.", + }, + { + name: "actions", + type: "Array", + description: "List of action buttons.", + }, + { + name: "layout", + type: "ChatActionLayout", + description: "`Column` or `Grid` layout.", + }, + ], + }, + { + id: "chat-bot-registration-status", + name: "ChatBotRegistrationStatus", + category: "chat", + definition: 'export type ChatBotRegistrationStatus = "New" | "Exists";', + description: "Whether the bot was newly registered or already existed.", + variants: [ + { + name: "New", + type: '{ tag: "New"; value?: undefined }', + description: "The bot was registered.", + }, + { + name: "Exists", + type: '{ tag: "Exists"; value?: undefined }', + description: "A bot with this ID already existed.", + }, + ], + }, + { + id: "chat-command", + name: "ChatCommand", + category: "chat", + definition: + "export interface ChatCommand {\n command: string;\n payload: string;\n}", + description: "A slash command from a chat user.", + fields: [ + { + name: "command", + type: "string", + description: "Command name.", + }, + { + name: "payload", + type: "string", + description: "Command arguments.", + }, + ], + }, + { + id: "chat-custom-message", + name: "ChatCustomMessage", + category: "chat", + definition: + "export interface ChatCustomMessage {\n messageType: string;\n payload: HexString;\n}", + description: + "A custom message with application-defined type and binary payload. The\nhost draws it through `Renderer::render`, with a `ChatMessage` context\ncarrying `message_type` and `payload` as the render payload.", + fields: [ + { + name: "message_type", + type: "string", + description: "Application-defined type key.", + }, + { + name: "payload", + type: "HexString", + description: "Binary payload.", + }, + ], + }, + { + id: "chat-file", + name: "ChatFile", + category: "chat", + definition: + "export interface ChatFile {\n url: string;\n fileName: string;\n mimeType: string;\n sizeBytes: bigint;\n text?: string;\n}", + description: "A file attachment in a chat message.", + fields: [ + { + name: "url", + type: "string", + description: "File download URL.", + }, + { + name: "file_name", + type: "string", + description: "File name.", + }, + { + name: "mime_type", + type: "string", + description: "MIME type.", + }, + { + name: "size_bytes", + type: "bigint", + description: "File size in bytes.", + }, + { + name: "text", + type: "string | undefined", + description: "Optional caption text.", + }, + ], + }, + { + id: "chat-media", + name: "ChatMedia", + category: "chat", + definition: "export interface ChatMedia {\n url: string;\n}", + description: "A media attachment.", + fields: [ + { + name: "url", + type: "string", + description: "Media URL.", + }, + ], + }, + { + id: "chat-message-content", + name: "ChatMessageContent", + category: "chat", + definition: + 'export type ChatMessageContent =\n | { tag: "Text"; value: { text: string } }\n | { tag: "RichText"; value: ChatRichText }\n | { tag: "Actions"; value: ChatActions }\n | { tag: "File"; value: ChatFile }\n | { tag: "Reaction"; value: ChatReaction }\n | { tag: "ReactionRemoved"; value: ChatReaction }\n | { tag: "Custom"; value: ChatCustomMessage }\n;', + description: "Content of a chat message -- one of several types.", + variants: [ + { + name: "Text", + type: '{ tag: "Text"; value: { text: string } }', + description: "Plain text message.", + }, + { + name: "RichText", + type: '{ tag: "RichText"; value: ChatRichText }', + description: "Rich text with media.", + }, + { + name: "Actions", + type: '{ tag: "Actions"; value: ChatActions }', + description: "Action button set.", + }, + { + name: "File", + type: '{ tag: "File"; value: ChatFile }', + description: "File attachment.", + }, + { + name: "Reaction", + type: '{ tag: "Reaction"; value: ChatReaction }', + description: "Emoji reaction.", + }, + { + name: "ReactionRemoved", + type: '{ tag: "ReactionRemoved"; value: ChatReaction }', + description: "Reaction removal.", + }, + { + name: "Custom", + type: '{ tag: "Custom"; value: ChatCustomMessage }', + description: "Custom message.", + }, + ], + }, + { + id: "chat-reaction", + name: "ChatReaction", + category: "chat", + definition: + "export interface ChatReaction {\n messageId: string;\n emoji: string;\n}", + description: "A reaction to a chat message.", + fields: [ + { + name: "message_id", + type: "string", + description: "Message being reacted to.", + }, + { + name: "emoji", + type: "string", + description: "Emoji reaction.", + }, + ], + }, + { + id: "chat-rich-text", + name: "ChatRichText", + category: "chat", + definition: + "export interface ChatRichText {\n text?: string;\n media: Array;\n}", + description: "Rich text message with optional media.", + fields: [ + { + name: "text", + type: "string | undefined", + description: "Optional text content.", + }, + { + name: "media", + type: "Array", + description: "Attached media items.", + }, + ], + }, + { + id: "chat-room", + name: "ChatRoom", + category: "chat", + definition: + "export interface ChatRoom {\n roomId: string;\n participatingAs: ChatRoomParticipation;\n}", + description: "A chat room the product participates in.", + fields: [ + { + name: "room_id", + type: "string", + description: "Room identifier.", + }, + { + name: "participating_as", + type: "ChatRoomParticipation", + description: "`RoomHost` or `Bot`.", + }, + ], + }, + { + id: "chat-room-participation", + name: "ChatRoomParticipation", + category: "chat", + definition: 'export type ChatRoomParticipation = "RoomHost" | "Bot";', + description: "How the product participates in a chat room.", + variants: [ + { + name: "RoomHost", + type: '{ tag: "RoomHost"; value?: undefined }', + description: "The product owns and hosts the room.", + }, + { + name: "Bot", + type: '{ tag: "Bot"; value?: undefined }', + description: "The product participates as a registered bot.", + }, + ], + }, + { + id: "chat-room-registration-status", + name: "ChatRoomRegistrationStatus", + category: "chat", + definition: 'export type ChatRoomRegistrationStatus = "New" | "Exists";', + description: "Whether the room was newly created or already existed.", + variants: [ + { + name: "New", + type: '{ tag: "New"; value?: undefined }', + description: "The room was created.", + }, + { + name: "Exists", + type: '{ tag: "Exists"; value?: undefined }', + description: "A room with this ID already existed.", + }, + ], + }, + { + id: "coin-payment-balance", + name: "CoinPaymentBalance", + category: "coin_payment", + definition: "export type CoinPaymentBalance = number;", + description: "Balance amount for CoinPayment operations.", + }, + { + id: "coin-payment-cheque", + name: "CoinPaymentCheque", + category: "coin_payment", + definition: + "export interface CoinPaymentCheque {\n id: CoinPaymentReceivable;\n amount: CoinPaymentBalance;\n encryptedSecrets: HexString;\n}", + description: "Standardized encrypted Coinage secret transmission payload.", + fields: [ + { + name: "id", + type: "CoinPaymentReceivable", + description: "Receivable public key protecting the cheque contents.", + }, + { + name: "amount", + type: "CoinPaymentBalance", + description: "Claimed payment amount.", + }, + { + name: "encrypted_secrets", + type: "HexString", + description: "Concatenated coin secrets encrypted to the receivable.", + }, + ], + }, + { + id: "coin-payment-clearing-reference", + name: "CoinPaymentClearingReference", + category: "coin_payment", + definition: + "export interface CoinPaymentClearingReference {\n root: CoinPaymentMerkleRoot;\n leaves: Array<[CoinPaymentCoinagePubKey, CoinPaymentTransactionHash]>;\n}", + description: + "Product-visible clearing reference for reconciliation and receipts.", + fields: [ + { + name: "root", + type: "CoinPaymentMerkleRoot", + description: "Clearing Merkle root.", + }, + { + name: "leaves", + type: "Array<[CoinPaymentCoinagePubKey, CoinPaymentTransactionHash]>", + description: "Product-visible coin key and transaction hash leaves.", + }, + ], + }, + { + id: "coin-payment-coinage-pub-key", + name: "CoinPaymentCoinagePubKey", + category: "coin_payment", + definition: "export type CoinPaymentCoinagePubKey = HexString;", + description: "Public Coinage key referenced by clearing evidence.", + }, + { + id: "coin-payment-error", + name: "CoinPaymentError", + category: "coin_payment", + definition: + 'export type CoinPaymentError = "BalanceLow" | "Denied" | "BadCoins" | "SnipedCoins" | "PurseNotFound" | "ReceivableNotFound" | "UnsupportedChannel" | "UserAgentCapabilityUnavailable" | "Internal";', + description: "Errors returned by CoinPayment host operations.", + variants: [ + { + name: "BalanceLow", + type: '{ tag: "BalanceLow"; value?: undefined }', + description: "Source purse has too little balance.", + }, + { + name: "Denied", + type: '{ tag: "Denied"; value?: undefined }', + description: "User agent denied spend, transfer, or access.", + }, + { + name: "BadCoins", + type: '{ tag: "BadCoins"; value?: undefined }', + description: "Coin secrets do not control valid coins.", + }, + { + name: "SnipedCoins", + type: '{ tag: "SnipedCoins"; value?: undefined }', + description: "Coin secrets were claimed elsewhere.", + }, + { + name: "PurseNotFound", + type: '{ tag: "PurseNotFound"; value?: undefined }', + description: "Purse does not exist or is not visible to the caller.", + }, + { + name: "ReceivableNotFound", + type: '{ tag: "ReceivableNotFound"; value?: undefined }', + description: + "Receivable does not exist or is not visible to the caller.", + }, + { + name: "UnsupportedChannel", + type: '{ tag: "UnsupportedChannel"; value?: undefined }', + description: "Requested transmission channel is not supported.", + }, + { + name: "UserAgentCapabilityUnavailable", + type: '{ tag: "UserAgentCapabilityUnavailable"; value?: undefined }', + description: "Required host/user-agent capability is unavailable.", + }, + { + name: "Internal", + type: '{ tag: "Internal"; value?: undefined }', + description: "Unexpected runtime failure.", + }, + ], + }, + { + id: "coin-payment-merkle-root", + name: "CoinPaymentMerkleRoot", + category: "coin_payment", + definition: "export type CoinPaymentMerkleRoot = HexString;", + description: "Merkle root for a product-visible clearing reference.", + }, + { + id: "coin-payment-product-id", + name: "CoinPaymentProductId", + category: "coin_payment", + definition: "export type CoinPaymentProductId = string;", + description: + "Authenticated product identifier recorded for a product-created purse.", + }, + { + id: "coin-payment-purse-id", + name: "CoinPaymentPurseId", + category: "coin_payment", + definition: "export type CoinPaymentPurseId = number;", + description: "RFC 0017 CoinPayment purse identifier.", + }, + { + id: "coin-payment-purse-info", + name: "CoinPaymentPurseInfo", + category: "coin_payment", + definition: + "export interface CoinPaymentPurseInfo {\n name: string;\n created: CoinPaymentTimestamp;\n creator: CoinPaymentProductId;\n balance: CoinPaymentBalance;\n}", + description: + "Product-visible metadata and balance state for a CoinPayment purse.", + fields: [ + { + name: "name", + type: "string", + description: + "Human-readable purse name supplied by the creating product.", + }, + { + name: "created", + type: "CoinPaymentTimestamp", + description: "Creation timestamp.", + }, + { + name: "creator", + type: "CoinPaymentProductId", + description: "Product that created the purse.", + }, + { + name: "balance", + type: "CoinPaymentBalance", + description: "Current product-visible balance.", + }, + ], + }, + { + id: "coin-payment-receivable", + name: "CoinPaymentReceivable", + category: "coin_payment", + definition: "export type CoinPaymentReceivable = HexString;", + description: "Public key identifying a CoinPayment receivable.", + }, + { + id: "coin-payment-status", + name: "CoinPaymentStatus", + category: "coin_payment", + definition: + 'export type CoinPaymentStatus =\n | { tag: "Clearing"; value: { clearing: CoinPaymentBalance; cleared: CoinPaymentBalance } }\n | { tag: "Failed"; value: { error: CoinPaymentError; cleared: CoinPaymentBalance; reference: CoinPaymentClearingReference } }\n | { tag: "Done"; value: { cleared: CoinPaymentBalance; reference: CoinPaymentClearingReference } }\n;', + description: "Clearing status stream item.", + variants: [ + { + name: "Clearing", + type: '{ tag: "Clearing"; value: { clearing: CoinPaymentBalance; cleared: CoinPaymentBalance } }', + description: "More coins have cleared.", + }, + { + name: "Failed", + type: '{ tag: "Failed"; value: { error: CoinPaymentError; cleared: CoinPaymentBalance; reference: CoinPaymentClearingReference } }', + description: "Some or all coins failed to transfer.", + }, + { + name: "Done", + type: '{ tag: "Done"; value: { cleared: CoinPaymentBalance; reference: CoinPaymentClearingReference } }', + description: "All coins cleared.", + }, + ], + }, + { + id: "coin-payment-timestamp", + name: "CoinPaymentTimestamp", + category: "coin_payment", + definition: "export type CoinPaymentTimestamp = bigint;", + description: "Milliseconds since Unix epoch.", + }, + { + id: "coin-payment-transaction-hash", + name: "CoinPaymentTransactionHash", + category: "coin_payment", + definition: "export type CoinPaymentTransactionHash = HexString;", + description: "Transaction hash for a product-visible clearing reference.", + }, + { + id: "coin-payment-transmission-channel", + name: "CoinPaymentTransmissionChannel", + category: "coin_payment", + definition: + 'export type CoinPaymentTransmissionChannel =\n | { tag: "Standard"; value: { sssTopic: HexString } }\n;', + description: "Standardized cheque transmission channel.", + variants: [ + { + name: "Standard", + type: '{ tag: "Standard"; value: { sssTopic: HexString } }', + description: "Statement-store/HOP handoff identified by an SSS topic.", + }, + ], + }, + { + id: "color-token", + name: "ColorToken", + category: "renderer", + definition: + 'export type ColorToken = "FgPrimary" | "FgSecondary" | "FgTertiary" | "BgSurfaceMain" | "BgSurfaceContainer" | "BgSurfaceNested" | "FgSuccess" | "FgError" | "FgWarning";', + description: "Semantic color tokens, resolved by the host's theme.", + variants: [ + { + name: "FgPrimary", + type: '{ tag: "FgPrimary"; value?: undefined }', + description: "Primary foreground.", + }, + { + name: "FgSecondary", + type: '{ tag: "FgSecondary"; value?: undefined }', + description: "Secondary foreground.", + }, + { + name: "FgTertiary", + type: '{ tag: "FgTertiary"; value?: undefined }', + description: "Tertiary foreground.", + }, + { + name: "BgSurfaceMain", + type: '{ tag: "BgSurfaceMain"; value?: undefined }', + description: "Main surface background.", + }, + { + name: "BgSurfaceContainer", + type: '{ tag: "BgSurfaceContainer"; value?: undefined }', + description: "Container surface background.", + }, + { + name: "BgSurfaceNested", + type: '{ tag: "BgSurfaceNested"; value?: undefined }', + description: "Nested surface background.", + }, + { + name: "FgSuccess", + type: '{ tag: "FgSuccess"; value?: undefined }', + description: "Foreground for success states.", + }, + { + name: "FgError", + type: '{ tag: "FgError"; value?: undefined }', + description: "Foreground for error states.", + }, + { + name: "FgWarning", + type: '{ tag: "FgWarning"; value?: undefined }', + description: "Foreground for warning states.", + }, + ], + }, + { + id: "column-props", + name: "ColumnProps", + category: "renderer", + definition: + "export interface ColumnProps {\n horizontalAlignment?: HorizontalAlignment;\n verticalArrangement?: Arrangement;\n}", + description: "Properties of a `Column`.", + fields: [ + { + name: "horizontal_alignment", + type: "HorizontalAlignment | undefined", + description: "Cross-axis alignment of children.", + }, + { + name: "vertical_arrangement", + type: "Arrangement | undefined", + description: "Main-axis distribution of children.", + }, + ], + }, + { + id: "content-alignment", + name: "ContentAlignment", + category: "renderer", + definition: + 'export type ContentAlignment = "TopStart" | "TopCenter" | "TopEnd" | "CenterStart" | "Center" | "CenterEnd" | "BottomStart" | "BottomCenter" | "BottomEnd";', + description: "Placement of content within a `Box`.", + variants: [ + { + name: "TopStart", + type: '{ tag: "TopStart"; value?: undefined }', + description: "Top edge, start side.", + }, + { + name: "TopCenter", + type: '{ tag: "TopCenter"; value?: undefined }', + description: "Top edge, horizontally centered.", + }, + { + name: "TopEnd", + type: '{ tag: "TopEnd"; value?: undefined }', + description: "Top edge, end side.", + }, + { + name: "CenterStart", + type: '{ tag: "CenterStart"; value?: undefined }', + description: "Vertically centered, start side.", + }, + { + name: "Center", + type: '{ tag: "Center"; value?: undefined }', + description: "Centered on both axes.", + }, + { + name: "CenterEnd", + type: '{ tag: "CenterEnd"; value?: undefined }', + description: "Vertically centered, end side.", + }, + { + name: "BottomStart", + type: '{ tag: "BottomStart"; value?: undefined }', + description: "Bottom edge, start side.", + }, + { + name: "BottomCenter", + type: '{ tag: "BottomCenter"; value?: undefined }', + description: "Bottom edge, horizontally centered.", + }, + { + name: "BottomEnd", + type: '{ tag: "BottomEnd"; value?: undefined }', + description: "Bottom edge, end side.", + }, + ], + }, + { + id: "contextual-alias", + name: "ContextualAlias", + category: "account", + definition: + "export interface ContextualAlias {\n context: HexString;\n alias: HexString;\n}", + description: + "A privacy-preserving alias derived via ring VRF, bound to a specific context.", + fields: [ + { + name: "context", + type: "HexString", + description: "32-byte context identifier the alias is bound to.", + }, + { + name: "alias", + type: "HexString", + description: "Ring VRF alias (variable length).", + }, + ], + }, + { + id: "derivation-index", + name: "DerivationIndex", + category: "account", + definition: + 'export type DerivationIndex =\n | { tag: "Index"; value: number }\n | { tag: "Raw"; value: HexString }\n;', + description: + "Account selector within a product subtree. Encodes as\n`Either` on the wire (`Index` = left, `Raw` = right).\n\n`Index` is the primary form — plain indices keep a product's accounts\nenumerable. `Raw` carries a raw 32-byte derivation index for cases where\nbytes are genuinely necessary. Hosts expand `Index(n)` to the internal\n32-byte index (`u32` little-endian plus the index magic).", + variants: [ + { + name: "Index", + type: '{ tag: "Index"; value: number }', + description: "Plain account index.", + }, + { + name: "Raw", + type: '{ tag: "Raw"; value: HexString }', + description: "Raw 32-byte derivation index.", + }, + ], + }, + { + id: "dimensions", + name: "Dimensions", + category: "renderer", + definition: + "export interface Dimensions {\n top: Size;\n end: Size;\n bottom?: Size;\n start?: Size;\n}", + description: + "Edge dimensions. `bottom` defaults to `top` and `start` to `end` when absent.", + fields: [ + { + name: "top", + type: "Size", + description: "Top edge.", + }, + { + name: "end", + type: "Size", + description: "End edge.", + }, + { + name: "bottom", + type: "Size | undefined", + description: "Bottom edge; defaults to `top`.", + }, + { + name: "start", + type: "Size | undefined", + description: "Start edge; defaults to `end`.", + }, + ], + }, + { + id: "effect", + name: "Effect", + category: "renderer", + definition: 'export type Effect = "Rainbow";', + description: + "A visual effect. Each variant names one effect and carries its parameters.", + variants: [ + { + name: "Rainbow", + type: '{ tag: "Rainbow"; value?: undefined }', + description: "Animated rainbow tint over the children.", + }, + ], + }, + { + id: "effect-props", + name: "EffectProps", + category: "renderer", + definition: "export interface EffectProps {\n effect: Effect;\n}", + description: "Properties of an `Effect`.", + fields: [ + { + name: "effect", + type: "Effect", + description: "The effect applied to the children.", + }, + ], + }, + { + id: "generic-error", + name: "GenericError", + category: "common", + definition: "export interface GenericError {\n reason: string;\n}", + description: + "Generic error payload carrying a human-readable reason string. Used by many\nmethods as a catch-all error type.", + fields: [ + { + name: "reason", + type: "string", + description: "Human-readable failure reason.", + }, + ], + }, + { + id: "genesis-hash", + name: "GenesisHash", + category: "transaction", + definition: "export type GenesisHash = HexString;", + description: + "A 32-byte chain genesis hash used to identify the target chain.", + }, + { + id: "horizontal-alignment", + name: "HorizontalAlignment", + category: "renderer", + definition: 'export type HorizontalAlignment = "Start" | "Center" | "End";', + description: "Cross-axis alignment of `Column` children.", + variants: [ + { + name: "Start", + type: '{ tag: "Start"; value?: undefined }', + description: "Align to the start edge.", + }, + { + name: "Center", + type: '{ tag: "Center"; value?: undefined }', + description: "Center horizontally.", + }, + { + name: "End", + type: '{ tag: "End"; value?: undefined }', + description: "Align to the end edge.", + }, + ], + }, + { + id: "host-account-connection-status-subscribe-item", + name: "HostAccountConnectionStatusSubscribeItem", + category: "account", + definition: + 'export type HostAccountConnectionStatusSubscribeItem = "Disconnected" | "Connected";', + description: "User's authentication state.", + variants: [ + { + name: "Disconnected", + type: '{ tag: "Disconnected"; value?: undefined }', + description: "User is not logged in to the host.", + }, + { + name: "Connected", + type: '{ tag: "Connected"; value?: undefined }', + description: "User is logged in to the host.", + }, + ], + }, + { + id: "host-account-create-proof-error", + name: "HostAccountCreateProofError", + category: "account", + definition: + 'export type HostAccountCreateProofError =\n | { tag: "RingNotFound"; value?: undefined }\n | { tag: "NotMember"; value?: undefined }\n | { tag: "KeyNotRegistered"; value?: undefined }\n | { tag: "KeyNotInRing"; value?: undefined }\n | { tag: "NotAllowlisted"; value?: undefined }\n | { tag: "Rejected"; value?: undefined }\n | { tag: "Unknown"; value: { reason: string } }\n;', + description: "Error returned when ring VRF proof creation fails.", + variants: [ + { + name: "RingNotFound", + type: '{ tag: "RingNotFound"; value?: undefined }', + description: "Ring not available at the specified location.", + }, + { + name: "NotMember", + type: '{ tag: "NotMember"; value?: undefined }', + description: + "The registered member key is not a member of the requested ring.", + }, + { + name: "KeyNotRegistered", + type: '{ tag: "KeyNotRegistered"; value?: undefined }', + description: "The key handle is not registered.", + }, + { + name: "KeyNotInRing", + type: '{ tag: "KeyNotInRing"; value?: undefined }', + description: "The key handle is not registered for the requested ring.", + }, + { + name: "NotAllowlisted", + type: '{ tag: "NotAllowlisted"; value?: undefined }', + description: "The foreign key owner has not allowlisted the caller.", + }, + { + name: "Rejected", + type: '{ tag: "Rejected"; value?: undefined }', + description: "User or host rejected.", + }, + { + name: "Unknown", + type: '{ tag: "Unknown"; value: { reason: string } }', + description: "Catch-all.", + }, + ], + }, + { + id: "host-account-create-proof-request", + name: "HostAccountCreateProofRequest", + category: "account", + definition: + "export interface HostAccountCreateProofRequest {\n keyHandle: ProductAccountId;\n context: ProductProofContext;\n ringLocation: RingLocation;\n message: HexString;\n}", + description: "Request to create a ring VRF proof.", + fields: [ + { + name: "key_handle", + type: "ProductAccountId", + description: "Ring-VRF key handle naming the member key to use.", + }, + { + name: "context", + type: "ProductProofContext", + description: "Product-scoped context the derived alias is bound to.", + }, + { + name: "ring_location", + type: "RingLocation", + description: "Ring to generate the proof against.", + }, + { + name: "message", + type: "HexString", + description: "Opaque message bound into the proof.", + }, + ], + }, + { + id: "host-account-create-proof-response", + name: "HostAccountCreateProofResponse", + category: "account", + definition: + "export interface HostAccountCreateProofResponse {\n proof: HexString;\n contextualAlias: ContextualAlias;\n ringIndex: number;\n ringRevision: number;\n}", + description: + "Response containing a ring VRF proof and the values needed to verify it\nagainst a downstream precompile.", + fields: [ + { + name: "proof", + type: "HexString", + description: "Variable-length ring VRF proof bytes.", + }, + { + name: "contextual_alias", + type: "ContextualAlias", + description: "Alias derived for the request's context.", + }, + { + name: "ring_index", + type: "number", + description: "Index of the selected member key within the ring.", + }, + { + name: "ring_revision", + type: "number", + description: "Ring revision the proof was generated against.", + }, + ], + }, + { + id: "host-account-get-alias-error", + name: "HostAccountGetAliasError", + category: "account", + definition: + 'export type HostAccountGetAliasError =\n | { tag: "RingNotFound"; value?: undefined }\n | { tag: "NotMember"; value?: undefined }\n | { tag: "KeyNotRegistered"; value?: undefined }\n | { tag: "KeyNotInRing"; value?: undefined }\n | { tag: "Rejected"; value?: undefined }\n | { tag: "Unknown"; value: { reason: string } }\n;', + description: "Error returned when contextual alias derivation fails.", + variants: [ + { + name: "RingNotFound", + type: '{ tag: "RingNotFound"; value?: undefined }', + description: "Ring not available at the specified location.", + }, + { + name: "NotMember", + type: '{ tag: "NotMember"; value?: undefined }', + description: + "The registered member key is not a member of the requested ring.", + }, + { + name: "KeyNotRegistered", + type: '{ tag: "KeyNotRegistered"; value?: undefined }', + description: "The key handle is not registered.", + }, + { + name: "KeyNotInRing", + type: '{ tag: "KeyNotInRing"; value?: undefined }', + description: "The key handle is not registered for the requested ring.", + }, + { + name: "Rejected", + type: '{ tag: "Rejected"; value?: undefined }', + description: "User or host rejected.", + }, + { + name: "Unknown", + type: '{ tag: "Unknown"; value: { reason: string } }', + description: "Catch-all.", + }, + ], + }, + { + id: "host-account-get-alias-request", + name: "HostAccountGetAliasRequest", + category: "account", + definition: + "export interface HostAccountGetAliasRequest {\n keyHandle: ProductAccountId;\n context: ProductProofContext;\n ringLocation: RingLocation;\n}", + description: + "Request to retrieve the contextual alias for a context and ring.", + fields: [ + { + name: "key_handle", + type: "ProductAccountId", + description: "Ring-VRF key handle naming the member key to use.", + }, + { + name: "context", + type: "ProductProofContext", + description: "Product-scoped context to derive the alias for.", + }, + { + name: "ring_location", + type: "RingLocation", + description: + "Ring whose member key the host should use; matches `create_proof`.", + }, + ], + }, + { + id: "host-account-get-error", + name: "HostAccountGetError", + category: "account", + definition: + 'export type HostAccountGetError =\n | { tag: "NotConnected"; value?: undefined }\n | { tag: "Rejected"; value?: undefined }\n | { tag: "DomainNotValid"; value?: undefined }\n | { tag: "Unknown"; value: { reason: string } }\n;', + description: "Error returned when credential/account requests fail.", + variants: [ + { + name: "NotConnected", + type: '{ tag: "NotConnected"; value?: undefined }', + description: "User is not logged in.", + }, + { + name: "Rejected", + type: '{ tag: "Rejected"; value?: undefined }', + description: "User or host rejected the request.", + }, + { + name: "DomainNotValid", + type: '{ tag: "DomainNotValid"; value?: undefined }', + description: "Domain identifier is invalid.", + }, + { + name: "Unknown", + type: '{ tag: "Unknown"; value: { reason: string } }', + description: "Catch-all error with reason.", + }, + ], + }, + { + id: "host-account-get-request", + name: "HostAccountGetRequest", + category: "account", + definition: + "export interface HostAccountGetRequest {\n productAccountId: ProductAccountId;\n}", + description: "Request to retrieve a product-scoped account.", + fields: [ + { + name: "product_account_id", + type: "ProductAccountId", + description: "Product account to retrieve.", + }, + ], + }, + { + id: "host-account-get-response", + name: "HostAccountGetResponse", + category: "account", + definition: + "export interface HostAccountGetResponse {\n account: ProductAccount;\n}", + description: "Response containing a product-scoped account.", + fields: [ + { + name: "account", + type: "ProductAccount", + description: "Retrieved product account.", + }, + ], + }, + { + id: "host-account-list-ring-vrf-keys-error", + name: "HostAccountListRingVrfKeysError", + category: "account", + definition: + 'export type HostAccountListRingVrfKeysError =\n | { tag: "NotConnected"; value?: undefined }\n | { tag: "Rejected"; value?: undefined }\n | { tag: "Unknown"; value: { reason: string } }\n;', + description: "Error returned when listing ring-VRF keys fails.", + variants: [ + { + name: "NotConnected", + type: '{ tag: "NotConnected"; value?: undefined }', + description: "User is not logged in.", + }, + { + name: "Rejected", + type: '{ tag: "Rejected"; value?: undefined }', + description: "User or host rejected.", + }, + { + name: "Unknown", + type: '{ tag: "Unknown"; value: { reason: string } }', + description: "Catch-all.", + }, + ], + }, + { + id: "host-account-list-ring-vrf-keys-request", + name: "HostAccountListRingVrfKeysRequest", + category: "account", + definition: + "export interface HostAccountListRingVrfKeysRequest {\n owner: string;\n disclosure: RingVrfKeyDisclosure;\n}", + description: + "Request to list registered ring-VRF keys for an owner product.", + fields: [ + { + name: "owner", + type: "string", + description: "Product whose registry entries should be listed.", + }, + { + name: "disclosure", + type: "RingVrfKeyDisclosure", + description: "Disclosure level requested by the caller.", + }, + ], + }, + { + id: "host-account-register-ring-vrf-key-error", + name: "HostAccountRegisterRingVrfKeyError", + category: "account", + definition: + 'export type HostAccountRegisterRingVrfKeyError =\n | { tag: "NotConnected"; value?: undefined }\n | { tag: "RingNotFound"; value?: undefined }\n | { tag: "Rejected"; value?: undefined }\n | { tag: "Unknown"; value: { reason: string } }\n;', + description: "Error returned when ring-VRF key registration fails.", + variants: [ + { + name: "NotConnected", + type: '{ tag: "NotConnected"; value?: undefined }', + description: "User is not logged in.", + }, + { + name: "RingNotFound", + type: '{ tag: "RingNotFound"; value?: undefined }', + description: "Ring not available at the specified location.", + }, + { + name: "Rejected", + type: '{ tag: "Rejected"; value?: undefined }', + description: "User or host rejected.", + }, + { + name: "Unknown", + type: '{ tag: "Unknown"; value: { reason: string } }', + description: "Catch-all.", + }, + ], + }, + { + id: "host-account-register-ring-vrf-key-request", + name: "HostAccountRegisterRingVrfKeyRequest", + category: "account", + definition: + "export interface HostAccountRegisterRingVrfKeyRequest {\n index: DerivationIndex;\n ring: RingLocation;\n}", + description: + "Request to register a ring-VRF key owned by the calling product.", + fields: [ + { + name: "index", + type: "DerivationIndex", + description: + "Key derivation index within the caller's ring-VRF domain.", + }, + { + name: "ring", + type: "RingLocation", + description: "Ring this key is declared for.", + }, + ], + }, + { + id: "host-account-ring-vrf-sign-error", + name: "HostAccountRingVrfSignError", + category: "account", + definition: + 'export type HostAccountRingVrfSignError =\n | { tag: "NotConnected"; value?: undefined }\n | { tag: "KeyNotRegistered"; value?: undefined }\n | { tag: "NotAllowlisted"; value?: undefined }\n | { tag: "Rejected"; value?: undefined }\n | { tag: "Unknown"; value: { reason: string } }\n;', + description: "Error returned when direct ring-VRF key signing fails.", + variants: [ + { + name: "NotConnected", + type: '{ tag: "NotConnected"; value?: undefined }', + description: "User is not logged in.", + }, + { + name: "KeyNotRegistered", + type: '{ tag: "KeyNotRegistered"; value?: undefined }', + description: "The key handle is not registered.", + }, + { + name: "NotAllowlisted", + type: '{ tag: "NotAllowlisted"; value?: undefined }', + description: "The foreign key owner has not allowlisted the caller.", + }, + { + name: "Rejected", + type: '{ tag: "Rejected"; value?: undefined }', + description: "User or host rejected.", + }, + { + name: "Unknown", + type: '{ tag: "Unknown"; value: { reason: string } }', + description: "Catch-all.", + }, + ], + }, + { + id: "host-account-ring-vrf-sign-request", + name: "HostAccountRingVrfSignRequest", + category: "account", + definition: + "export interface HostAccountRingVrfSignRequest {\n keyHandle: ProductAccountId;\n message: HexString;\n}", + description: "Request to sign bytes with a registered ring-VRF key.", + fields: [ + { + name: "key_handle", + type: "ProductAccountId", + description: "Registered key handle.", + }, + { + name: "message", + type: "HexString", + description: "Opaque message to sign.", + }, + ], + }, + { + id: "host-account-sign-vrf-error", + name: "HostAccountSignVrfError", + category: "account", + definition: + 'export type HostAccountSignVrfError =\n | { tag: "NotConnected"; value?: undefined }\n | { tag: "Rejected"; value?: undefined }\n | { tag: "Unknown"; value: { reason: string } }\n;', + description: "Error returned when VRF signing fails.", + variants: [ + { + name: "NotConnected", + type: '{ tag: "NotConnected"; value?: undefined }', + description: "User is not logged in.", + }, + { + name: "Rejected", + type: '{ tag: "Rejected"; value?: undefined }', + description: "User or host rejected the signing confirmation.", + }, + { + name: "Unknown", + type: '{ tag: "Unknown"; value: { reason: string } }', + description: "Catch-all.", + }, + ], + }, + { + id: "host-account-sign-vrf-request", + name: "HostAccountSignVrfRequest", + category: "account", + definition: + "export interface HostAccountSignVrfRequest {\n account: ProductAccountId;\n transcriptLabel: HexString;\n items: Array;\n}", + description: + "Request to produce an sr25519 VRF signature from a product account over a\ncaller-supplied Merlin transcript.", + fields: [ + { + name: "account", + type: "ProductAccountId", + description: "Account whose key signs the VRF.", + }, + { + name: "transcript_label", + type: "HexString", + description: + "Root domain-separation label: `Transcript::new(transcript_label)`.", + }, + { + name: "items", + type: "Array", + description: + "Transcript items replayed in order as `append_message(label, value)`.", + }, + ], + }, + { + id: "host-chat-action-subscribe-item", + name: "HostChatActionSubscribeItem", + category: "chat", + definition: + "export interface HostChatActionSubscribeItem {\n roomId: string;\n peer: string;\n payload: ChatActionPayload;\n}", + description: "A chat action received from the host.", + fields: [ + { + name: "room_id", + type: "string", + description: "Room where the action occurred.", + }, + { + name: "peer", + type: "string", + description: "Peer who initiated the action.", + }, + { + name: "payload", + type: "ChatActionPayload", + description: "The action payload.", + }, + ], + }, + { + id: "host-chat-create-room-error", + name: "HostChatCreateRoomError", + category: "chat", + definition: + 'export type HostChatCreateRoomError =\n | { tag: "PermissionDenied"; value?: undefined }\n | { tag: "Unknown"; value: { reason: string } }\n;', + description: "Chat room registration error.", + variants: [ + { + name: "PermissionDenied", + type: '{ tag: "PermissionDenied"; value?: undefined }', + description: "Not allowed.", + }, + { + name: "Unknown", + type: '{ tag: "Unknown"; value: { reason: string } }', + description: "Catch-all.", + }, + ], + }, + { + id: "host-chat-create-room-request", + name: "HostChatCreateRoomRequest", + category: "chat", + definition: + "export interface HostChatCreateRoomRequest {\n roomId: string;\n name: string;\n icon: string;\n}", + description: "Request to create a chat room.", + fields: [ + { + name: "room_id", + type: "string", + description: "Unique room identifier.", + }, + { + name: "name", + type: "string", + description: "Room display name.", + }, + { + name: "icon", + type: "string", + description: "URL or base64 image.", + }, + ], + }, + { + id: "host-chat-create-room-response", + name: "HostChatCreateRoomResponse", + category: "chat", + definition: + "export interface HostChatCreateRoomResponse {\n status: ChatRoomRegistrationStatus;\n}", + description: "Result of a room registration.", + fields: [ + { + name: "status", + type: "ChatRoomRegistrationStatus", + description: "`New` or `Exists`.", + }, + ], + }, + { + id: "host-chat-list-subscribe-item", + name: "HostChatListSubscribeItem", + category: "chat", + definition: + "export interface HostChatListSubscribeItem {\n rooms: Array;\n}", + description: "Item containing the current chat rooms.", + fields: [ + { + name: "rooms", + type: "Array", + description: "Chat rooms the product participates in.", + }, + ], + }, + { + id: "host-chat-post-message-error", + name: "HostChatPostMessageError", + category: "chat", + definition: + 'export type HostChatPostMessageError =\n | { tag: "MessageTooLarge"; value?: undefined }\n | { tag: "Unknown"; value: { reason: string } }\n;', + description: "Chat message posting error.", + variants: [ + { + name: "MessageTooLarge", + type: '{ tag: "MessageTooLarge"; value?: undefined }', + description: "Message exceeded size limit.", + }, + { + name: "Unknown", + type: '{ tag: "Unknown"; value: { reason: string } }', + description: "Catch-all.", + }, + ], + }, + { + id: "host-chat-post-message-request", + name: "HostChatPostMessageRequest", + category: "chat", + definition: + "export interface HostChatPostMessageRequest {\n roomId: string;\n payload: ChatMessageContent;\n}", + description: "Request to post a message to a chat room.", + fields: [ + { + name: "room_id", + type: "string", + description: "Room to post to.", + }, + { + name: "payload", + type: "ChatMessageContent", + description: "Message content.", + }, + ], + }, + { + id: "host-chat-post-message-response", + name: "HostChatPostMessageResponse", + category: "chat", + definition: + "export interface HostChatPostMessageResponse {\n messageId: string;\n}", + description: "Result of posting a message.", + fields: [ + { + name: "message_id", + type: "string", + description: + "Host-assigned message id, and the correlation key for any action the\nmessage carries: a trigger names it in [`ActionTrigger::message_id`].", + }, + ], + }, + { + id: "host-chat-register-bot-error", + name: "HostChatRegisterBotError", + category: "chat", + definition: + 'export type HostChatRegisterBotError =\n | { tag: "PermissionDenied"; value?: undefined }\n | { tag: "Unknown"; value: { reason: string } }\n;', + description: "Chat bot registration error.", + variants: [ + { + name: "PermissionDenied", + type: '{ tag: "PermissionDenied"; value?: undefined }', + description: "Not allowed.", + }, + { + name: "Unknown", + type: '{ tag: "Unknown"; value: { reason: string } }', + description: "Catch-all.", + }, + ], + }, + { + id: "host-chat-register-bot-request", + name: "HostChatRegisterBotRequest", + category: "chat", + definition: + "export interface HostChatRegisterBotRequest {\n botId: string;\n name: string;\n icon: string;\n}", + description: "Request to register a chat bot.", + fields: [ + { + name: "bot_id", + type: "string", + description: "Unique bot identifier.", + }, + { + name: "name", + type: "string", + description: "Bot display name.", + }, + { + name: "icon", + type: "string", + description: "URL or base64 image.", + }, + ], + }, + { + id: "host-chat-register-bot-response", + name: "HostChatRegisterBotResponse", + category: "chat", + definition: + "export interface HostChatRegisterBotResponse {\n status: ChatBotRegistrationStatus;\n}", + description: "Result of a bot registration.", + fields: [ + { + name: "status", + type: "ChatBotRegistrationStatus", + description: "`New` or `Exists`.", + }, + ], + }, + { + id: "host-coin-payment-create-cheque-request", + name: "HostCoinPaymentCreateChequeRequest", + category: "coin_payment", + definition: + "export interface HostCoinPaymentCreateChequeRequest {\n from: CoinPaymentPurseId;\n to: CoinPaymentReceivable;\n amount: CoinPaymentBalance;\n}", + description: + "Request to create a cheque from a local purse to a receivable.", + fields: [ + { + name: "from", + type: "CoinPaymentPurseId", + description: "Source purse.", + }, + { + name: "to", + type: "CoinPaymentReceivable", + description: "Destination receivable.", + }, + { + name: "amount", + type: "CoinPaymentBalance", + description: "Payment amount.", + }, + ], + }, + { + id: "host-coin-payment-create-cheque-response", + name: "HostCoinPaymentCreateChequeResponse", + category: "coin_payment", + definition: + "export interface HostCoinPaymentCreateChequeResponse {\n cheque: CoinPaymentCheque;\n}", + description: "Created cheque response.", + fields: [ + { + name: "cheque", + type: "CoinPaymentCheque", + description: "Encrypted cheque.", + }, + ], + }, + { + id: "host-coin-payment-create-purse-request", + name: "HostCoinPaymentCreatePurseRequest", + category: "coin_payment", + definition: + "export interface HostCoinPaymentCreatePurseRequest {\n name: string;\n}", + description: "Request to create a new firewalled CoinPayment purse.", + fields: [ + { + name: "name", + type: "string", + description: "Human-readable purse name.", + }, + ], + }, + { + id: "host-coin-payment-create-purse-response", + name: "HostCoinPaymentCreatePurseResponse", + category: "coin_payment", + definition: + "export interface HostCoinPaymentCreatePurseResponse {\n purse: CoinPaymentPurseId;\n}", + description: "Created purse identifier.", + fields: [ + { + name: "purse", + type: "CoinPaymentPurseId", + description: "Assigned purse identifier.", + }, + ], + }, + { + id: "host-coin-payment-create-receivable-request", + name: "HostCoinPaymentCreateReceivableRequest", + category: "coin_payment", + definition: + "export interface HostCoinPaymentCreateReceivableRequest {\n into: CoinPaymentPurseId;\n}", + description: "Request to create a fresh receivable for a purse.", + fields: [ + { + name: "into", + type: "CoinPaymentPurseId", + description: "Target purse for future deposits.", + }, + ], + }, + { + id: "host-coin-payment-create-receivable-response", + name: "HostCoinPaymentCreateReceivableResponse", + category: "coin_payment", + definition: + "export interface HostCoinPaymentCreateReceivableResponse {\n receivable: CoinPaymentReceivable;\n}", + description: "Created receivable response.", + fields: [ + { + name: "receivable", + type: "CoinPaymentReceivable", + description: "Receivable public key.", + }, + ], + }, + { + id: "host-coin-payment-delete-purse-request", + name: "HostCoinPaymentDeletePurseRequest", + category: "coin_payment", + definition: + "export interface HostCoinPaymentDeletePurseRequest {\n target: CoinPaymentPurseId;\n drainInto: CoinPaymentPurseId;\n}", + description: "Request to delete a purse after draining its balance.", + fields: [ + { + name: "target", + type: "CoinPaymentPurseId", + description: "Purse to delete.", + }, + { + name: "drain_into", + type: "CoinPaymentPurseId", + description: "Purse that receives drained funds.", + }, + ], + }, + { + id: "host-coin-payment-deposit-request", + name: "HostCoinPaymentDepositRequest", + category: "coin_payment", + definition: + "export interface HostCoinPaymentDepositRequest {\n cheque: CoinPaymentCheque;\n}", + description: + "Request to deposit a cheque into the purse associated with its receivable.", + fields: [ + { + name: "cheque", + type: "CoinPaymentCheque", + description: "Cheque to deposit.", + }, + ], + }, + { + id: "host-coin-payment-listen-for-item", + name: "HostCoinPaymentListenForItem", + category: "coin_payment", + definition: + 'export type HostCoinPaymentListenForItem =\n | { tag: "Channel"; value: CoinPaymentTransmissionChannel }\n | { tag: "Cheque"; value: CoinPaymentCheque }\n;', + description: "Stream item for `host_coin_payment_listen_for`.", + variants: [ + { + name: "Channel", + type: '{ tag: "Channel"; value: CoinPaymentTransmissionChannel }', + description: "Handoff channel suitable for inclusion in an invoice.", + }, + { + name: "Cheque", + type: '{ tag: "Cheque"; value: CoinPaymentCheque }', + description: "Cheque received through the handoff channel.", + }, + ], + }, + { + id: "host-coin-payment-listen-for-request", + name: "HostCoinPaymentListenForRequest", + category: "coin_payment", + definition: + "export interface HostCoinPaymentListenForRequest {\n receivable: CoinPaymentReceivable;\n}", + description: "Request to listen for a cheque delivered to a receivable.", + fields: [ + { + name: "receivable", + type: "CoinPaymentReceivable", + description: "Receivable to listen for.", + }, + ], + }, + { + id: "host-coin-payment-query-purse-request", + name: "HostCoinPaymentQueryPurseRequest", + category: "coin_payment", + definition: + "export interface HostCoinPaymentQueryPurseRequest {\n purse: CoinPaymentPurseId;\n}", + description: "Request to query product-visible purse metadata.", + fields: [ + { + name: "purse", + type: "CoinPaymentPurseId", + description: "Purse to query.", + }, + ], + }, + { + id: "host-coin-payment-query-purse-response", + name: "HostCoinPaymentQueryPurseResponse", + category: "coin_payment", + definition: + "export interface HostCoinPaymentQueryPurseResponse {\n info: CoinPaymentPurseInfo;\n}", + description: "Product-visible purse metadata response.", + fields: [ + { + name: "info", + type: "CoinPaymentPurseInfo", + description: "Purse information.", + }, + ], + }, + { + id: "host-coin-payment-rebalance-purse-request", + name: "HostCoinPaymentRebalancePurseRequest", + category: "coin_payment", + definition: + "export interface HostCoinPaymentRebalancePurseRequest {\n from: CoinPaymentPurseId;\n to: CoinPaymentPurseId;\n amount: CoinPaymentBalance;\n}", + description: "Request to transfer balance between local purses.", + fields: [ + { + name: "from", + type: "CoinPaymentPurseId", + description: "Source purse.", + }, + { + name: "to", + type: "CoinPaymentPurseId", + description: "Destination purse.", + }, + { + name: "amount", + type: "CoinPaymentBalance", + description: "Amount to move.", + }, + ], + }, + { + id: "host-coin-payment-refund-request", + name: "HostCoinPaymentRefundRequest", + category: "coin_payment", + definition: + "export interface HostCoinPaymentRefundRequest {\n receivable: CoinPaymentReceivable;\n}", + description: "Request to refund coins associated with a receivable.", + fields: [ + { + name: "receivable", + type: "CoinPaymentReceivable", + description: "Receivable to refund.", + }, + ], + }, + { + id: "host-create-transaction-error", + name: "HostCreateTransactionError", + category: "transaction", + definition: + 'export type HostCreateTransactionError =\n | { tag: "FailedToDecode"; value?: undefined }\n | { tag: "Rejected"; value?: undefined }\n | { tag: "NotSupported"; value: { reason: string } }\n | { tag: "PermissionDenied"; value?: undefined }\n | { tag: "Unknown"; value: { reason: string } }\n;', + description: "Transaction creation error.", + variants: [ + { + name: "FailedToDecode", + type: '{ tag: "FailedToDecode"; value?: undefined }', + description: "Payload could not be deserialized.", + }, + { + name: "Rejected", + type: '{ tag: "Rejected"; value?: undefined }', + description: "User rejected.", + }, + { + name: "NotSupported", + type: '{ tag: "NotSupported"; value: { reason: string } }', + description: "Unsupported payload version or extension.", + }, + { + name: "PermissionDenied", + type: '{ tag: "PermissionDenied"; value?: undefined }', + description: "Not authenticated.", + }, + { + name: "Unknown", + type: '{ tag: "Unknown"; value: { reason: string } }', + description: "Catch-all.", + }, + ], + }, + { + id: "host-create-transaction-response", + name: "HostCreateTransactionResponse", + category: "signing", + definition: + "export interface HostCreateTransactionResponse {\n transaction: HexString;\n}", + description: "Response containing a created transaction.", + fields: [ + { + name: "transaction", + type: "HexString", + description: + "SCALE-encoded transaction, signed unless the request supplied its own\nV5 `VerifyMultiSignature` extension.", + }, + ], + }, + { + id: "host-create-transaction-with-legacy-account-response", + name: "HostCreateTransactionWithLegacyAccountResponse", + category: "signing", + definition: + "export interface HostCreateTransactionWithLegacyAccountResponse {\n transaction: HexString;\n}", + description: + "Response containing a transaction created with a non-product account.", + fields: [ + { + name: "transaction", + type: "HexString", + description: + "SCALE-encoded transaction, signed unless the request supplied its own\nV5 `VerifyMultiSignature` extension.", + }, + ], + }, + { + id: "host-derive-entropy-error", + name: "HostDeriveEntropyError", + category: "entropy", + definition: + 'export type HostDeriveEntropyError =\n | { tag: "Unknown"; value: { reason: string } }\n;', + description: "Error from [`crate::api::Entropy::derive`] (RFC 0007).", + variants: [ + { + name: "Unknown", + type: '{ tag: "Unknown"; value: { reason: string } }', + description: "Catch-all.", + }, + ], + }, + { + id: "host-derive-entropy-request", + name: "HostDeriveEntropyRequest", + category: "entropy", + definition: + "export interface HostDeriveEntropyRequest {\n context: HexString;\n}", + description: + "Request to derive deterministic per-product entropy (RFC 0007).\n\nThe host derives 32 bytes from product-scoped seed material and `context`.\nRepeated calls with the same `context` for the same product yield the same\nentropy.", + fields: [ + { + name: "context", + type: "HexString", + description: "Domain-separated derivation context.", + }, + ], + }, + { + id: "host-derive-entropy-response", + name: "HostDeriveEntropyResponse", + category: "entropy", + definition: + "export interface HostDeriveEntropyResponse {\n entropy: HexString;\n}", + description: + "Response carrying 32 bytes of deterministically derived entropy.", + fields: [ + { + name: "entropy", + type: "HexString", + description: "32 bytes of derived entropy.", + }, + ], + }, + { + id: "host-device-permission-request", + name: "HostDevicePermissionRequest", + category: "permissions", + definition: + 'export type HostDevicePermissionRequest = "Notifications" | "Camera" | "Microphone" | "Bluetooth" | "NFC" | "Location" | "Clipboard" | "OpenUrl" | "Biometrics";', + description: + "Device-capability permission requested from the host (RFC 0002).\n\nLasting grants and denials survive app restarts. A host may also offer a\none-use grant, held in memory until a permission-gated operation consumes it.\n\nThat decision is about this product. The OS grant behind it belongs to the\nhost application and can move independently, so a host that can read OS\nstate has the capability resolve only while both allow it: a stored grant\nwhose OS grant was revoked answers `granted: false` without a prompt. An OS\ngrant that is merely undetermined does not change the answer, because the OS\nresolves its own gate when the capability is used.", + variants: [ + { + name: "Notifications", + type: '{ tag: "Notifications"; value?: undefined }', + description: "Showing system notifications.", + }, + { + name: "Camera", + type: '{ tag: "Camera"; value?: undefined }', + description: "Camera capture access.", + }, + { + name: "Microphone", + type: '{ tag: "Microphone"; value?: undefined }', + description: "Microphone capture access.", + }, + { + name: "Bluetooth", + type: '{ tag: "Bluetooth"; value?: undefined }', + description: "Bluetooth device access.", + }, + { + name: "NFC", + type: '{ tag: "NFC"; value?: undefined }', + description: "NFC reader access.", + }, + { + name: "Location", + type: '{ tag: "Location"; value?: undefined }', + description: "Geolocation access.", + }, + { + name: "Clipboard", + type: '{ tag: "Clipboard"; value?: undefined }', + description: "Clipboard access.", + }, + { + name: "OpenUrl", + type: '{ tag: "OpenUrl"; value?: undefined }', + description: + "Opening an external URL through `navigate_to`. A one-use grant allows\none handoff to the browser or another system application.", + }, + { + name: "Biometrics", + type: '{ tag: "Biometrics"; value?: undefined }', + description: "Biometric authentication.", + }, + ], + }, + { + id: "host-device-permission-response", + name: "HostDevicePermissionResponse", + category: "permissions", + definition: + "export interface HostDevicePermissionResponse {\n granted: boolean;\n}", + description: "Outcome of a device-permission request.", + fields: [ + { + name: "granted", + type: "boolean", + description: "Whether the permission was granted.", + }, + ], + }, + { + id: "host-feature-supported-request", + name: "HostFeatureSupportedRequest", + category: "system", + definition: + 'export type HostFeatureSupportedRequest =\n | { tag: "Chain"; value: { genesisHash: HexString } }\n;', + description: "Request to query whether a feature is supported by the host.", + variants: [ + { + name: "Chain", + type: '{ tag: "Chain"; value: { genesisHash: HexString } }', + description: + "Ask whether the host can interact with the chain identified by genesis hash.", + }, + ], + }, + { + id: "host-feature-supported-response", + name: "HostFeatureSupportedResponse", + category: "system", + definition: + "export interface HostFeatureSupportedResponse {\n supported: boolean;\n}", + description: "Response to a feature-support query.", + fields: [ + { + name: "supported", + type: "boolean", + description: "Whether the feature is supported.", + }, + ], + }, + { + id: "host-get-legacy-accounts-response", + name: "HostGetLegacyAccountsResponse", + category: "account", + definition: + "export interface HostGetLegacyAccountsResponse {\n accounts: Array;\n}", + description: + "Response containing all legacy (user-imported) accounts owned by the user.", + fields: [ + { + name: "accounts", + type: "Array", + description: "Legacy accounts.", + }, + ], + }, + { + id: "host-get-product-context-response", + name: "HostGetProductContextResponse", + category: "system", + definition: + "export interface HostGetProductContextResponse {\n productId: string;\n}", + description: + "Response containing the product context bound to the current host runtime.", + fields: [ + { + name: "product_id", + type: "string", + description: + "Full canonical identifier used for authorization and account derivation.", + }, + ], + }, + { + id: "host-get-user-id-error", + name: "HostGetUserIdError", + category: "account", + definition: + 'export type HostGetUserIdError =\n | { tag: "PermissionDenied"; value?: undefined }\n | { tag: "NotConnected"; value?: undefined }\n | { tag: "Unknown"; value: { reason: string } }\n;', + description: "Error from [`crate::api::Account::get_user_id`].", + variants: [ + { + name: "PermissionDenied", + type: '{ tag: "PermissionDenied"; value?: undefined }', + description: "User denied the identity disclosure request.", + }, + { + name: "NotConnected", + type: '{ tag: "NotConnected"; value?: undefined }', + description: "User is not logged in.", + }, + { + name: "Unknown", + type: '{ tag: "Unknown"; value: { reason: string } }', + description: "Catch-all.", + }, + ], + }, + { + id: "host-get-user-id-response", + name: "HostGetUserIdResponse", + category: "account", + definition: + "export interface HostGetUserIdResponse {\n primaryUsername: string;\n}", + description: "The user's primary DotNS account identity.", + fields: [ + { + name: "primary_username", + type: "string", + description: "The user's primary DotNS username.", + }, + ], + }, + { + id: "host-handshake-error", + name: "HostHandshakeError", + category: "system", + definition: + 'export type HostHandshakeError =\n | { tag: "Timeout"; value?: undefined }\n | { tag: "UnsupportedProtocolVersion"; value?: undefined }\n | { tag: "Unknown"; value: GenericError }\n;', + description: + "Error from [`crate::api::System::handshake`] (RFC 0009).\n\nThe handshake is the first call on a fresh connection; it does not require\nuser authentication and is used to negotiate the wire codec version.", + variants: [ + { + name: "Timeout", + type: '{ tag: "Timeout"; value?: undefined }', + description: "Host did not complete the handshake in time.", + }, + { + name: "UnsupportedProtocolVersion", + type: '{ tag: "UnsupportedProtocolVersion"; value?: undefined }', + description: + "Host does not speak the codec version requested by the product.", + }, + { + name: "Unknown", + type: '{ tag: "Unknown"; value: GenericError }', + description: "Catch-all.", + }, + ], + }, + { + id: "host-handshake-request", + name: "HostHandshakeRequest", + category: "system", + definition: + "export interface HostHandshakeRequest {\n codecVersion: number;\n}", + description: + "Wire-codec negotiation payload sent by the product (RFC 0009).", + fields: [ + { + name: "codec_version", + type: "number", + description: "Wire codec version requested by the product.", + }, + ], + }, + { + id: "host-info", + name: "HostInfo", + category: "system", + definition: + "export interface HostInfo {\n platform: HostPlatform;\n name: string;\n version: string;\n}", + description: + "Identity and version of the host currently running the product.\n\nReported by [`crate::api::System::host_info`] so a product knows which host\n(and which build of it) is running it — for adapting to the host,\ntelemetry, and attributing behaviour to a concrete build in diagnostics and\nbug reports.", + fields: [ + { + name: "platform", + type: "HostPlatform", + description: "Platform category the host runs on.", + }, + { + name: "name", + type: "string", + description: + 'Human-readable name of the host implementation, e.g. `"Polkadot\nDesktop"`, `"Polkadot Mobile"`, or `"dotli"`. Hosts should report a\nstable, non-empty name.', + }, + { + name: "version", + type: "string", + description: + 'Host-native version string, e.g. a semver such as `"1.2.3"`. Hosts\nshould report a non-empty value; the format is the host\'s own.', + }, + ], + }, + { + id: "host-local-storage-change-item", + name: "HostLocalStorageChangeItem", + category: "local_storage", + definition: + "export interface HostLocalStorageChangeItem {\n value?: HexString;\n}", + description: + "A change to a subscribed storage key, pushed to the subscriber.", + fields: [ + { + name: "value", + type: "HexString | undefined", + description: + "Value after the change. `Some` on write, `None` after clear.", + }, + ], + }, + { + id: "host-local-storage-clear-request", + name: "HostLocalStorageClearRequest", + category: "local_storage", + definition: + "export interface HostLocalStorageClearRequest {\n key: string;\n}", + description: "Request to clear a local storage key.", + fields: [ + { + name: "key", + type: "string", + description: "Storage key to clear.", + }, + ], + }, + { + id: "host-local-storage-read-error", + name: "HostLocalStorageReadError", + category: "local_storage", + definition: + 'export type HostLocalStorageReadError =\n | { tag: "Full"; value?: undefined }\n | { tag: "AccessNotGranted"; value?: undefined }\n | { tag: "Unknown"; value: { reason: string } }\n;', + description: "Local storage read failure.", + variants: [ + { + name: "Full", + type: '{ tag: "Full"; value?: undefined }', + description: "Storage quota exceeded.", + }, + { + name: "AccessNotGranted", + type: '{ tag: "AccessNotGranted"; value?: undefined }', + description: + "The addressed storage belongs to another product that has not granted\nthis caller the `storage` scope.\n\nOne variant answers every reason: the product does not resolve, it\npublished no manifest, or its manifest grants this caller nothing.\nDistinguishing them would make the call a probe for which products exist\nand which hold data.", + }, + { + name: "Unknown", + type: '{ tag: "Unknown"; value: { reason: string } }', + description: "Catch-all.", + }, + ], + }, + { + id: "host-local-storage-read-request", + name: "HostLocalStorageReadRequest", + category: "local_storage", + definition: + "export interface HostLocalStorageReadRequest {\n product?: string;\n key: string;\n}", + description: + "Request to read a local storage value.\n\nStorage is private by default: `product: None` addresses the caller's own\nstorage, which is what every v0.1 read resolved to. Naming another product\nreads that product's storage instead, and succeeds only if that product's\nmanifest grants this caller the `storage` scope.", + fields: [ + { + name: "product", + type: "string | undefined", + description: + "Product whose storage is read. `None`, or the caller's own id, means the\ncaller, and consults no grant.", + }, + { + name: "key", + type: "string", + description: "Storage key to read.", + }, + ], + }, + { + id: "host-local-storage-read-response", + name: "HostLocalStorageReadResponse", + category: "local_storage", + definition: + "export interface HostLocalStorageReadResponse {\n value?: HexString;\n}", + description: "Response containing an optional local storage value.", + fields: [ + { + name: "value", + type: "HexString | undefined", + description: "Stored value, if present.", + }, + ], + }, + { + id: "host-local-storage-subscribe-request", + name: "HostLocalStorageSubscribeRequest", + category: "local_storage", + definition: + "export interface HostLocalStorageSubscribeRequest {\n key: string;\n}", + description: "Request to subscribe to changes of one local storage key.", + fields: [ + { + name: "key", + type: "string", + description: "Storage key to observe.", + }, + ], + }, + { + id: "host-local-storage-write-request", + name: "HostLocalStorageWriteRequest", + category: "local_storage", + definition: + "export interface HostLocalStorageWriteRequest {\n key: string;\n value: HexString;\n}", + description: "Request to write a value into local storage.", + fields: [ + { + name: "key", + type: "string", + description: "Storage key to write.", + }, + { + name: "value", + type: "HexString", + description: "Value to store at the key.", + }, + ], + }, + { + id: "host-locale-subscribe-item", + name: "HostLocaleSubscribeItem", + category: "locale", + definition: + "export interface HostLocaleSubscribeItem {\n languageTag: string;\n}", + description: + "Locale the host currently presents its interface in, pushed to subscribers.", + fields: [ + { + name: "language_tag", + type: "string", + description: + "BCP 47 language tag, such as `en`, `pt-BR` or `zh-Hans`. The set is\nopen: a product that does not ship the tag chooses its own fallback.", + }, + ], + }, + { + id: "host-navigate-to-error", + name: "HostNavigateToError", + category: "system", + definition: + 'export type HostNavigateToError =\n | { tag: "PermissionDenied"; value?: undefined }\n | { tag: "Unknown"; value: { reason: string } }\n;', + description: "Error from [`crate::api::System::navigate_to`].", + variants: [ + { + name: "PermissionDenied", + type: '{ tag: "PermissionDenied"; value?: undefined }', + description: + "The target host is not authorized for outbound access: the user answered\nno to the prompt, a stored decision already refused it, or no prompt\ncould be put to the user.", + }, + { + name: "Unknown", + type: '{ tag: "Unknown"; value: { reason: string } }', + description: "Catch-all.", + }, + ], + }, + { + id: "host-navigate-to-request", + name: "HostNavigateToRequest", + category: "system", + definition: "export interface HostNavigateToRequest {\n url: string;\n}", + description: "Request to navigate the host to an external URL.", + fields: [ + { + name: "url", + type: "string", + description: "URL to open.", + }, + ], + }, + { + id: "host-payment-balance-subscribe-error", + name: "HostPaymentBalanceSubscribeError", + category: "payment", + definition: + 'export type HostPaymentBalanceSubscribeError =\n | { tag: "PermissionDenied"; value?: undefined }\n | { tag: "Unknown"; value: { reason: string } }\n;', + description: + "Error from [`crate::api::Payment::balance_subscribe`].\n\nSee [RFC 0006].\n\n[RFC 0006]: https://github.com/paritytech/triangle-js-sdks/pull/94", + variants: [ + { + name: "PermissionDenied", + type: '{ tag: "PermissionDenied"; value?: undefined }', + description: "User denied the balance disclosure request.", + }, + { + name: "Unknown", + type: '{ tag: "Unknown"; value: { reason: string } }', + description: "Catch-all.", + }, + ], + }, + { + id: "host-payment-balance-subscribe-item", + name: "HostPaymentBalanceSubscribeItem", + category: "payment", + definition: + "export interface HostPaymentBalanceSubscribeItem {\n available: Balance;\n}", + description: + "Current payment balance state pushed to subscribers.\n\nSee [RFC 0006].\n\n[RFC 0006]: https://github.com/paritytech/triangle-js-sdks/pull/94", + fields: [ + { + name: "available", + type: "Balance", + description: "Balance that can be spent right now.", + }, + ], + }, + { + id: "host-payment-balance-subscribe-request", + name: "HostPaymentBalanceSubscribeRequest", + category: "payment", + definition: + "export interface HostPaymentBalanceSubscribeRequest {\n purse?: CoinPaymentPurseId;\n}", + description: "Request to subscribe to payment balance updates.", + fields: [ + { + name: "purse", + type: "CoinPaymentPurseId | undefined", + description: "Optional purse selector. `None` means MAIN_PURSE.", + }, + ], + }, + { + id: "host-payment-error", + name: "HostPaymentError", + category: "payment", + definition: + 'export type HostPaymentError =\n | { tag: "Rejected"; value?: undefined }\n | { tag: "InsufficientBalance"; value?: undefined }\n | { tag: "Unknown"; value: { reason: string } }\n;', + description: + "Error from [`crate::api::Payment::request`].\n\nSee [RFC 0006].\n\n[RFC 0006]: https://github.com/paritytech/triangle-js-sdks/pull/94", + variants: [ + { + name: "Rejected", + type: '{ tag: "Rejected"; value?: undefined }', + description: "User rejected the payment request.", + }, + { + name: "InsufficientBalance", + type: '{ tag: "InsufficientBalance"; value?: undefined }', + description: + "User's available balance is not sufficient for the requested amount.", + }, + { + name: "Unknown", + type: '{ tag: "Unknown"; value: { reason: string } }', + description: "Catch-all.", + }, + ], + }, + { + id: "host-payment-request", + name: "HostPaymentRequest", + category: "payment", + definition: + "export interface HostPaymentRequest {\n from?: CoinPaymentPurseId;\n amount: Balance;\n destination: HexString;\n}", + description: "Request to initiate a payment to another account.", + fields: [ + { + name: "from", + type: "CoinPaymentPurseId | undefined", + description: "Optional purse selector. `None` means MAIN_PURSE.", + }, + { + name: "amount", + type: "Balance", + description: "Amount to pay.", + }, + { + name: "destination", + type: "HexString", + description: "Destination account.", + }, + ], + }, + { + id: "host-payment-response", + name: "HostPaymentResponse", + category: "payment", + definition: "export interface HostPaymentResponse {\n id: string;\n}", + description: + "Receipt returned after a successful payment request.\n\nSee [RFC 0006].\n\n[RFC 0006]: https://github.com/paritytech/triangle-js-sdks/pull/94", + fields: [ + { + name: "id", + type: "string", + description: "The assigned payment identifier.", + }, + ], + }, + { + id: "host-payment-status-subscribe-error", + name: "HostPaymentStatusSubscribeError", + category: "payment", + definition: + 'export type HostPaymentStatusSubscribeError =\n | { tag: "PaymentNotFound"; value?: undefined }\n | { tag: "Unknown"; value: { reason: string } }\n;', + description: + "Error from [`crate::api::Payment::status_subscribe`].\n\nSee [RFC 0006].\n\n[RFC 0006]: https://github.com/paritytech/triangle-js-sdks/pull/94", + variants: [ + { + name: "PaymentNotFound", + type: '{ tag: "PaymentNotFound"; value?: undefined }', + description: + "Payment ID was not found or does not belong to the current product.", + }, + { + name: "Unknown", + type: '{ tag: "Unknown"; value: { reason: string } }', + description: "Catch-all.", + }, + ], + }, + { + id: "host-payment-status-subscribe-item", + name: "HostPaymentStatusSubscribeItem", + category: "payment", + definition: + 'export type HostPaymentStatusSubscribeItem =\n | { tag: "Processing"; value?: undefined }\n | { tag: "Completed"; value?: undefined }\n | { tag: "Failed"; value: { reason: string } }\n;', + description: + "Payment lifecycle status pushed to subscribers.\n\nOnce a terminal state (`Completed` or `Failed`) is reached, the host\ndelivers it and may close the subscription.\n\nSee [RFC 0006].\n\n[RFC 0006]: https://github.com/paritytech/triangle-js-sdks/pull/94", + variants: [ + { + name: "Processing", + type: '{ tag: "Processing"; value?: undefined }', + description: "Payment is being processed.", + }, + { + name: "Completed", + type: '{ tag: "Completed"; value?: undefined }', + description: "Payment has been settled successfully.", + }, + { + name: "Failed", + type: '{ tag: "Failed"; value: { reason: string } }', + description: "Payment has failed.", + }, + ], + }, + { + id: "host-payment-status-subscribe-request", + name: "HostPaymentStatusSubscribeRequest", + category: "payment", + definition: + "export interface HostPaymentStatusSubscribeRequest {\n paymentId: string;\n}", + description: "Request to subscribe to a payment status.", + fields: [ + { + name: "payment_id", + type: "string", + description: "Payment identifier to watch.", + }, + ], + }, + { + id: "host-payment-top-up-error", + name: "HostPaymentTopUpError", + category: "payment", + definition: + 'export type HostPaymentTopUpError =\n | { tag: "InsufficientFunds"; value?: undefined }\n | { tag: "InvalidSource"; value?: undefined }\n | { tag: "PartialPayment"; value: { credited: Balance } }\n | { tag: "Unknown"; value: { reason: string } }\n;', + description: + "Error from [`crate::api::Payment::top_up`].\n\nSee [RFC 0006].\n\n[RFC 0006]: https://github.com/paritytech/triangle-js-sdks/pull/94", + variants: [ + { + name: "InsufficientFunds", + type: '{ tag: "InsufficientFunds"; value?: undefined }', + description: "The source account does not hold sufficient funds.", + }, + { + name: "InvalidSource", + type: '{ tag: "InvalidSource"; value?: undefined }', + description: "The source account was not found or is invalid.", + }, + { + name: "PartialPayment", + type: '{ tag: "PartialPayment"; value: { credited: Balance } }', + description: + "Some coins were claimed but the total fell short of the requested amount.", + }, + { + name: "Unknown", + type: '{ tag: "Unknown"; value: { reason: string } }', + description: "Catch-all.", + }, + ], + }, + { + id: "host-payment-top-up-request", + name: "HostPaymentTopUpRequest", + category: "payment", + definition: + "export interface HostPaymentTopUpRequest {\n into?: CoinPaymentPurseId;\n amount: Balance;\n source: PaymentTopUpSource;\n}", + description: "Request to top up the product payment balance.", + fields: [ + { + name: "into", + type: "CoinPaymentPurseId | undefined", + description: "Optional purse selector. `None` means MAIN_PURSE.", + }, + { + name: "amount", + type: "Balance", + description: "Amount to top up.", + }, + { + name: "source", + type: "PaymentTopUpSource", + description: "Funding source for the top-up.", + }, + ], + }, + { + id: "host-platform", + name: "HostPlatform", + category: "system", + definition: + 'export type HostPlatform = "Web" | "Android" | "Ios" | "Desktop" | "Cli" | "Unknown";', + description: "Platform category a host runs on.", + variants: [ + { + name: "Web", + type: '{ tag: "Web"; value?: undefined }', + description: "Browser-embedded product (an iframe inside a web host).", + }, + { + name: "Android", + type: '{ tag: "Android"; value?: undefined }', + description: "Android application.", + }, + { + name: "Ios", + type: '{ tag: "Ios"; value?: undefined }', + description: "iOS application.", + }, + { + name: "Desktop", + type: '{ tag: "Desktop"; value?: undefined }', + description: "Desktop application.", + }, + { + name: "Cli", + type: '{ tag: "Cli"; value?: undefined }', + description: + "Command-line host running in a terminal or headless environment.", + }, + { + name: "Unknown", + type: '{ tag: "Unknown"; value?: undefined }', + description: "Host could not classify its platform.", + }, + ], + }, + { + id: "host-pocket-list-subscribe-item", + name: "HostPocketListSubscribeItem", + category: "pocket", + definition: + "export interface HostPocketListSubscribeItem {\n cards: Array;\n}", + description: + "The calling product's cards: the whole set on subscribe and after every change.", + fields: [ + { + name: "cards", + type: "Array", + description: "Cards currently in Pocket for the calling product.", + }, + ], + }, + { + id: "host-pocket-remove-card-error", + name: "HostPocketRemoveCardError", + category: "pocket", + definition: + 'export type HostPocketRemoveCardError =\n | { tag: "Privileged"; value?: undefined }\n | { tag: "Unknown"; value: { reason: string } }\n;', + description: "Card removal failure.", + variants: [ + { + name: "Privileged", + type: '{ tag: "Privileged"; value?: undefined }', + description: "The card is privileged and stays in Pocket.", + }, + { + name: "Unknown", + type: '{ tag: "Unknown"; value: { reason: string } }', + description: "Catch-all.", + }, + ], + }, + { + id: "host-pocket-remove-card-request", + name: "HostPocketRemoveCardRequest", + category: "pocket", + definition: + "export interface HostPocketRemoveCardRequest {\n cardId: string;\n}", + description: "Request to remove one of the calling product's cards.", + fields: [ + { + name: "card_id", + type: "string", + description: + "Card to remove. A card that is not present is already removed.", + }, + ], + }, + { + id: "host-push-notification-cancel-request", + name: "HostPushNotificationCancelRequest", + category: "notifications", + definition: + "export interface HostPushNotificationCancelRequest {\n id: NotificationId;\n}", + description: "Request to cancel a previously scheduled notification.", + fields: [ + { + name: "id", + type: "NotificationId", + description: + "The notification identifier returned by [`HostPushNotificationResponse`].", + }, + ], + }, + { + id: "host-push-notification-error", + name: "HostPushNotificationError", + category: "notifications", + definition: + 'export type HostPushNotificationError =\n | { tag: "ScheduleLimitReached"; value?: undefined }\n | { tag: "Unknown"; value: { reason: string } }\n;', + description: "Push notification error.", + variants: [ + { + name: "ScheduleLimitReached", + type: '{ tag: "ScheduleLimitReached"; value?: undefined }', + description: + "The host-wide queue of pending scheduled notifications is full.", + }, + { + name: "Unknown", + type: '{ tag: "Unknown"; value: { reason: string } }', + description: "Catch-all.", + }, + ], + }, + { + id: "host-push-notification-request", + name: "HostPushNotificationRequest", + category: "notifications", + definition: + "export interface HostPushNotificationRequest {\n text: string;\n deeplink?: string;\n scheduledAt?: bigint;\n}", + description: + "Push notification payload.\n\nWhen `scheduled_at` is `Some`, the notification is deferred to the given\nwall-clock instant (Unix milliseconds UTC). `None` fires immediately,\npreserving prior behaviour. See [RFC 0019].\n\n[RFC 0019]: https://github.com/paritytech/host-rust-core/blob/main/docs/rfcs/0019-scheduled-notifications.md", + fields: [ + { + name: "text", + type: "string", + description: "Notification text.", + }, + { + name: "deeplink", + type: "string | undefined", + description: "Optional URL to open on tap.", + }, + { + name: "scheduled_at", + type: "bigint | undefined", + description: + "Optional Unix timestamp in milliseconds (UTC) at which the notification\nshould fire. `None` fires immediately.", + }, + ], + }, + { + id: "host-push-notification-response", + name: "HostPushNotificationResponse", + category: "notifications", + definition: + "export interface HostPushNotificationResponse {\n id: NotificationId;\n}", + description: + "Successful push notification response carrying the assigned id.", + fields: [ + { + name: "id", + type: "NotificationId", + description: "Host-assigned notification identifier.", + }, + ], + }, + { + id: "host-renderer-action-subscribe-item", + name: "HostRendererActionSubscribeItem", + category: "renderer", + definition: + "export interface HostRendererActionSubscribeItem {\n context: RenderContext;\n actionId: string;\n payload: HexString;\n}", + description: "An action triggered inside a product-rendered body.", + fields: [ + { + name: "context", + type: "RenderContext", + description: "Where the body lives.", + }, + { + name: "action_id", + type: "string", + description: + "Which action was triggered, as named in the renderer tree.", + }, + { + name: "payload", + type: "HexString", + description: + "Data the node attached to the action. A `Button` press carries an\nempty payload; a `TextField` value change carries the UTF-8 bytes of\nthe new value, with no length prefix.", + }, + ], + }, + { + id: "host-request-login-error", + name: "HostRequestLoginError", + category: "account", + definition: + 'export type HostRequestLoginError =\n | { tag: "Unknown"; value: { reason: string } }\n;', + description: "Login request error.", + variants: [ + { + name: "Unknown", + type: '{ tag: "Unknown"; value: { reason: string } }', + description: "Catch-all.", + }, + ], + }, + { + id: "host-request-login-request", + name: "HostRequestLoginRequest", + category: "account", + definition: + "export interface HostRequestLoginRequest {\n reason?: string;\n}", + description: "Request to present the host login flow.", + fields: [ + { + name: "reason", + type: "string | undefined", + description: "Optional human-readable reason shown in the login UI.", + }, + ], + }, + { + id: "host-request-login-response", + name: "HostRequestLoginResponse", + category: "account", + definition: + 'export type HostRequestLoginResponse = "Success" | "AlreadyConnected" | "Rejected";', + description: "Result of a login request.", + variants: [ + { + name: "Success", + type: '{ tag: "Success"; value?: undefined }', + description: "User successfully authenticated.", + }, + { + name: "AlreadyConnected", + type: '{ tag: "AlreadyConnected"; value?: undefined }', + description: "User is already authenticated — no action was taken.", + }, + { + name: "Rejected", + type: '{ tag: "Rejected"; value?: undefined }', + description: "User dismissed/rejected the login UI.", + }, + ], + }, + { + id: "host-request-resource-allocation-request", + name: "HostRequestResourceAllocationRequest", + category: "resource_allocation", + definition: + "export interface HostRequestResourceAllocationRequest {\n resources: Array;\n}", + description: "Batched resource pre-allocation request (RFC 0010).", + fields: [ + { + name: "resources", + type: "Array", + description: "Resources to allocate.", + }, + ], + }, + { + id: "host-request-resource-allocation-response", + name: "HostRequestResourceAllocationResponse", + category: "resource_allocation", + definition: + "export interface HostRequestResourceAllocationResponse {\n outcomes: Array;\n}", + description: + "Per-resource outcomes for a batched allocation request (RFC 0010).", + fields: [ + { + name: "outcomes", + type: "Array", + description: + "Per-resource allocation outcomes, in the same order as the request.", + }, + ], + }, + { + id: "host-sign-payload-data", + name: "HostSignPayloadData", + category: "signing", + definition: + "export interface HostSignPayloadData {\n blockHash: HexString;\n blockNumber: HexString;\n era: HexString;\n genesisHash: HexString;\n method: HexString;\n nonce: HexString;\n specVersion: HexString;\n tip: HexString;\n transactionVersion: HexString;\n signedExtensions: Array;\n version: number;\n assetId?: HexString;\n metadataHash?: HexString;\n mode?: number;\n withSignedTransaction?: boolean;\n}", + description: + "Full Substrate extrinsic signing payload with all fields needed for signature\ngeneration.", + fields: [ + { + name: "block_hash", + type: "HexString", + description: "Reference block hash.", + }, + { + name: "block_number", + type: "HexString", + description: "Reference block number.", + }, + { + name: "era", + type: "HexString", + description: "Mortality era encoding.", + }, + { + name: "genesis_hash", + type: "HexString", + description: "Chain genesis hash.", + }, + { + name: "method", + type: "HexString", + description: "SCALE-encoded call data.", + }, + { + name: "nonce", + type: "HexString", + description: "Account nonce.", + }, + { + name: "spec_version", + type: "HexString", + description: "Runtime spec version.", + }, + { + name: "tip", + type: "HexString", + description: "Transaction tip.", + }, + { + name: "transaction_version", + type: "HexString", + description: "Transaction format version.", + }, + { + name: "signed_extensions", + type: "Array", + description: "Extension identifiers.", + }, + { + name: "version", + type: "number", + description: "Extrinsic version.", + }, + { + name: "asset_id", + type: "HexString | undefined", + description: "For multi-asset tips.", + }, + { + name: "metadata_hash", + type: "HexString | undefined", + description: "CheckMetadataHash extension.", + }, + { + name: "mode", + type: "number | undefined", + description: "Metadata mode.", + }, + { + name: "with_signed_transaction", + type: "boolean | undefined", + description: + "Request signed transaction back, encoded as one byte: absent, true, or false.", + }, + ], + }, + { + id: "host-sign-payload-error", + name: "HostSignPayloadError", + category: "signing", + definition: + 'export type HostSignPayloadError =\n | { tag: "FailedToDecode"; value?: undefined }\n | { tag: "Rejected"; value?: undefined }\n | { tag: "PermissionDenied"; value?: undefined }\n | { tag: "Unknown"; value: { reason: string } }\n;', + description: "Signing operation error.", + variants: [ + { + name: "FailedToDecode", + type: '{ tag: "FailedToDecode"; value?: undefined }', + description: "Payload could not be deserialized.", + }, + { + name: "Rejected", + type: '{ tag: "Rejected"; value?: undefined }', + description: "User rejected signing.", + }, + { + name: "PermissionDenied", + type: '{ tag: "PermissionDenied"; value?: undefined }', + description: "Not authenticated.", + }, + { + name: "Unknown", + type: '{ tag: "Unknown"; value: { reason: string } }', + description: "Catch-all.", + }, + ], + }, + { + id: "host-sign-payload-request", + name: "HostSignPayloadRequest", + category: "signing", + definition: + "export interface HostSignPayloadRequest {\n account: ProductAccountId;\n payload: HostSignPayloadData;\n}", + description: "Request to sign an extrinsic payload with a product account.", + fields: [ + { + name: "account", + type: "ProductAccountId", + description: "Product account that will sign this payload.", + }, + { + name: "payload", + type: "HostSignPayloadData", + description: "The extrinsic payload to sign.", + }, + ], + }, + { + id: "host-sign-payload-response", + name: "HostSignPayloadResponse", + category: "signing", + definition: + "export interface HostSignPayloadResponse {\n signature: HexString;\n signedTransaction?: HexString;\n}", + description: "Result of a signing operation.", + fields: [ + { + name: "signature", + type: "HexString", + description: "The cryptographic signature.", + }, + { + name: "signed_transaction", + type: "HexString | undefined", + description: "Full signed transaction, if requested.", + }, + ], + }, + { + id: "host-sign-payload-with-legacy-account-request", + name: "HostSignPayloadWithLegacyAccountRequest", + category: "signing", + definition: + "export interface HostSignPayloadWithLegacyAccountRequest {\n signer: string;\n payload: HostSignPayloadData;\n}", + description: + "Sign a Substrate extrinsic payload with a non-product (legacy) account.\nContains the same fields as [`HostSignPayloadRequest`] minus `address`\n(replaced by `signer`).", + fields: [ + { + name: "signer", + type: "string", + description: "Signer address (SS58 or hex) of the legacy account.", + }, + { + name: "payload", + type: "HostSignPayloadData", + description: "The extrinsic payload to sign.", + }, + ], + }, + { + id: "host-sign-raw-request", + name: "HostSignRawRequest", + category: "signing", + definition: + "export interface HostSignRawRequest {\n account: ProductAccountId;\n payload: RawPayload;\n}", + description: + "A raw signing request pairing an account with the payload to sign.", + fields: [ + { + name: "account", + type: "ProductAccountId", + description: "Product account that will sign this payload.", + }, + { + name: "payload", + type: "RawPayload", + description: "The payload to sign.", + }, + ], + }, + { + id: "host-sign-raw-with-legacy-account-request", + name: "HostSignRawWithLegacyAccountRequest", + category: "signing", + definition: + "export interface HostSignRawWithLegacyAccountRequest {\n signer: string;\n payload: RawPayload;\n}", + description: + "Sign raw bytes with a non-product (legacy) account. The signer field\nidentifies which legacy account to use.", + fields: [ + { + name: "signer", + type: "string", + description: "Signer address (SS58 or hex) of the legacy account.", + }, + { + name: "payload", + type: "RawPayload", + description: "The data to sign.", + }, + ], + }, + { + id: "host-theme-subscribe-item", + name: "HostThemeSubscribeItem", + category: "theme", + definition: + "export interface HostThemeSubscribeItem {\n name: ThemeName;\n variant: ThemeVariant;\n}", + description: "Current theme state pushed to subscribers.", + fields: [ + { + name: "name", + type: "ThemeName", + description: "Theme name.", + }, + { + name: "variant", + type: "ThemeVariant", + description: "Light or dark variant.", + }, + ], + }, + { + id: "host-worker-begin-operation-request", + name: "HostWorkerBeginOperationRequest", + category: "worker", + definition: + "export interface HostWorkerBeginOperationRequest {\n label?: string;\n}", + description: "Request to begin a pending operation.", + fields: [ + { + name: "label", + type: "string | undefined", + description: "Optional label for host logs and UI.", + }, + ], + }, + { + id: "host-worker-begin-operation-response", + name: "HostWorkerBeginOperationResponse", + category: "worker", + definition: + "export interface HostWorkerBeginOperationResponse {\n id: OperationId;\n}", + description: "Response carrying the id of a newly begun operation.", + fields: [ + { + name: "id", + type: "OperationId", + description: "Id to pass to `end_operation`.", + }, + ], + }, + { + id: "host-worker-end-operation-request", + name: "HostWorkerEndOperationRequest", + category: "worker", + definition: + "export interface HostWorkerEndOperationRequest {\n id: OperationId;\n}", + description: "Request to end a pending operation.", + fields: [ + { + name: "id", + type: "OperationId", + description: "Id returned by `begin_operation`.", + }, + ], + }, + { + id: "host-worker-operation-error", + name: "HostWorkerOperationError", + category: "worker", + definition: + 'export type HostWorkerOperationError =\n | { tag: "TooManyOpen"; value?: undefined }\n | { tag: "Unknown"; value: { reason: string } }\n;', + description: "Pending-operation error.", + variants: [ + { + name: "TooManyOpen", + type: '{ tag: "TooManyOpen"; value?: undefined }', + description: + "The product is already at the host's per-product limit of open\noperations.", + }, + { + name: "Unknown", + type: '{ tag: "Unknown"; value: { reason: string } }', + description: "Catch-all host failure.", + }, + ], + }, + { + id: "image-fit", + name: "ImageFit", + category: "renderer", + definition: + 'export type ImageFit = "None" | "Fill" | "Cover" | "Contain" | "ScaleDown";', + description: "How an image meets the box its modifiers size.", + variants: [ + { + name: "None", + type: '{ tag: "None"; value?: undefined }', + description: "The image is not resized.", + }, + { + name: "Fill", + type: '{ tag: "Fill"; value?: undefined }', + description: + "Resized to fill the container without preserving the aspect ratio.", + }, + { + name: "Cover", + type: '{ tag: "Cover"; value?: undefined }', + description: + "Preserves the aspect ratio and fills the container, cutting overflow.", + }, + { + name: "Contain", + type: '{ tag: "Contain"; value?: undefined }', + description: + "Preserves the aspect ratio and fits inside the container, leaving empty\nspace if needed.", + }, + { + name: "ScaleDown", + type: '{ tag: "ScaleDown"; value?: undefined }', + description: + "Whichever of `None` or `Contain` yields the smaller image.", + }, + ], + }, + { + id: "image-props", + name: "ImageProps", + category: "renderer", + definition: + "export interface ImageProps {\n source: ImageSource;\n fit?: ImageFit;\n}", + description: "Properties of an `Image`.", + fields: [ + { + name: "source", + type: "ImageSource", + description: "Where the image bytes come from.", + }, + { + name: "fit", + type: "ImageFit | undefined", + description: "Defaults to `Fill`.", + }, + ], + }, + { + id: "image-source", + name: "ImageSource", + category: "renderer", + definition: + 'export type ImageSource =\n | { tag: "Bulletin"; value: string }\n | { tag: "Archive"; value: string }\n;', + description: + "Where image bytes come from. The host fetches them; the tree carries no URL.", + variants: [ + { + name: "Bulletin", + type: '{ tag: "Bulletin"; value: string }', + description: "A Bulletin chain blob, addressed by its CID.", + }, + { + name: "Archive", + type: '{ tag: "Archive"; value: string }', + description: + "A file inside the product's executable archive, as a path relative to\nthe archive root.", + }, + ], + }, + { + id: "legacy-account", + name: "LegacyAccount", + category: "account", + definition: + "export interface LegacyAccount {\n publicKey: HexString;\n name?: string;\n}", + description: + "A user-imported (legacy) account: public key plus an optional user-chosen\ndisplay name.\n\nReturned by [`HostGetLegacyAccountsResponse`]. Distinct from\n[`ProductAccount`], which is protocol-derived and never carries a label.", + fields: [ + { + name: "public_key", + type: "HexString", + description: "The account public key (variable-length bytes).", + }, + { + name: "name", + type: "string | undefined", + description: "Optional user-chosen display name.", + }, + ], + }, + { + id: "legacy-account-tx-payload", + name: "LegacyAccountTxPayload", + category: "transaction", + definition: + "export interface LegacyAccountTxPayload {\n signer: AccountId;\n genesisHash: GenesisHash;\n callData: HexString;\n extensions: Array;\n txExtVersion: number;\n}", + description: + "Transaction payload for a legacy (non-product) account.\n\nIdentical to [`ProductAccountTxPayload`] except the signer is a raw\n32-byte [`AccountId`].", + fields: [ + { + name: "signer", + type: "AccountId", + description: "Raw 32-byte public key of the legacy account.", + }, + { + name: "genesis_hash", + type: "GenesisHash", + description: "Chain where the transaction will execute.", + }, + { + name: "call_data", + type: "HexString", + description: "SCALE-encoded Call data.", + }, + { + name: "extensions", + type: "Array", + description: "Transaction extensions supplied by the caller.", + }, + { + name: "tx_ext_version", + type: "number", + description: "0 for Extrinsic V4, runtime-supported value for V5.", + }, + ], + }, + { + id: "modifier", + name: "Modifier", + category: "renderer", + definition: + 'export type Modifier =\n | { tag: "Margin"; value: Dimensions }\n | { tag: "Padding"; value: Dimensions }\n | { tag: "Background"; value: Background }\n | { tag: "Border"; value: BorderStyle }\n | { tag: "Height"; value: Size }\n | { tag: "Width"; value: Size }\n | { tag: "MinWidth"; value: Size }\n | { tag: "MinHeight"; value: Size }\n | { tag: "FillWidth"; value: boolean }\n | { tag: "FillHeight"; value: boolean }\n | { tag: "Opacity"; value: number }\n | { tag: "BlendingMode"; value: BlendingMode }\n;', + description: "Layout and styling applied to one node.", + variants: [ + { + name: "Margin", + type: '{ tag: "Margin"; value: Dimensions }', + description: "Outer spacing.", + }, + { + name: "Padding", + type: '{ tag: "Padding"; value: Dimensions }', + description: "Inner spacing.", + }, + { + name: "Background", + type: '{ tag: "Background"; value: Background }', + description: "Background fill.", + }, + { + name: "Border", + type: '{ tag: "Border"; value: BorderStyle }', + description: "Border.", + }, + { + name: "Height", + type: '{ tag: "Height"; value: Size }', + description: "Fixed height.", + }, + { + name: "Width", + type: '{ tag: "Width"; value: Size }', + description: "Fixed width.", + }, + { + name: "MinWidth", + type: '{ tag: "MinWidth"; value: Size }', + description: "Minimum width.", + }, + { + name: "MinHeight", + type: '{ tag: "MinHeight"; value: Size }', + description: "Minimum height.", + }, + { + name: "FillWidth", + type: '{ tag: "FillWidth"; value: boolean }', + description: "Fill the available width.", + }, + { + name: "FillHeight", + type: '{ tag: "FillHeight"; value: boolean }', + description: "Fill the available height.", + }, + { + name: "Opacity", + type: '{ tag: "Opacity"; value: number }', + description: "0 is transparent, 255 is opaque.", + }, + { + name: "BlendingMode", + type: '{ tag: "BlendingMode"; value: BlendingMode }', + description: "Compositing mode against what is behind the node.", + }, + ], + }, + { + id: "notification-id", + name: "NotificationId", + category: "notifications", + definition: "export type NotificationId = number;", + description: + "Opaque identifier for a push notification, unique per product.", + }, + { + id: "operation-id", + name: "OperationId", + category: "worker", + definition: "export type OperationId = number;", + description: + "Opaque host-assigned pending-operation identifier, unique per product.", + }, + { + id: "operation-started-result", + name: "OperationStartedResult", + category: "chain", + definition: + 'export type OperationStartedResult =\n | { tag: "Started"; value: { operationId: string } }\n | { tag: "LimitReached"; value?: undefined }\n;', + description: "Outcome of starting a chain-head operation.", + variants: [ + { + name: "Started", + type: '{ tag: "Started"; value: { operationId: string } }', + description: + "The operation was accepted; results arrive as follow events.", + }, + { + name: "LimitReached", + type: '{ tag: "LimitReached"; value?: undefined }', + description: + "Too many operations are in progress; retry after some complete.", + }, + ], + }, + { + id: "payment-top-up-source", + name: "PaymentTopUpSource", + category: "payment", + definition: + 'export type PaymentTopUpSource =\n | { tag: "ProductAccount"; value: { derivationIndex: DerivationIndex } }\n | { tag: "PrivateKey"; value: { sr25519SecretKey: HexString } }\n | { tag: "Coins"; value: { sr25519SecretKeys: Array } }\n;', + description: + "Source for a payment top-up operation.\n\nSee [RFC 0006].\n\n[RFC 0006]: https://github.com/paritytech/triangle-js-sdks/pull/94", + variants: [ + { + name: "ProductAccount", + type: '{ tag: "ProductAccount"; value: { derivationIndex: DerivationIndex } }', + description: "Fund from one of the calling product's scoped accounts.", + }, + { + name: "PrivateKey", + type: '{ tag: "PrivateKey"; value: { sr25519SecretKey: HexString } }', + description: + "Fund from a one-time account represented by its private key. This is a\nstandard account holding public funds, not a coin key.", + }, + { + name: "Coins", + type: '{ tag: "Coins"; value: { sr25519SecretKeys: Array } }', + description: + "Fund directly from coin secret keys. Each key is an sr25519 secret\ncontrolling a single coin.", + }, + ], + }, + { + id: "pocket-card", + name: "PocketCard", + category: "pocket", + definition: + "export interface PocketCard {\n cardId: string;\n privileged: boolean;\n}", + description: "One of the calling product's Pocket cards.", + fields: [ + { + name: "card_id", + type: "string", + description: + "Card label declared by the product, unique within the product.", + }, + { + name: "privileged", + type: "boolean", + description: + "Placed by the host itself; removable by neither the user nor the product.", + }, + ], + }, + { + id: "preimage-submit-error", + name: "PreimageSubmitError", + category: "preimage", + definition: + 'export type PreimageSubmitError =\n | { tag: "Unknown"; value: { reason: string } }\n;', + description: "Preimage submission error.", + variants: [ + { + name: "Unknown", + type: '{ tag: "Unknown"; value: { reason: string } }', + description: "Catch-all.", + }, + ], + }, + { + id: "product-account", + name: "ProductAccount", + category: "account", + definition: "export interface ProductAccount {\n publicKey: HexString;\n}", + description: "A product account: public key only, no display name.", + fields: [ + { + name: "public_key", + type: "HexString", + description: "The account public key (variable-length bytes).", + }, + ], + }, + { + id: "product-account-id", + name: "ProductAccountId", + category: "account", + definition: + "export interface ProductAccountId {\n dotNsIdentifier: string;\n derivationIndex: DerivationIndex;\n}", + description: + "Identifies a product-specific account by combining a dotNS domain name with a\nderivation index.", + fields: [ + { + name: "dot_ns_identifier", + type: "string", + description: + 'A dotNS domain name identifier (e.g., `"my-product.dot"`).', + }, + { + name: "derivation_index", + type: "DerivationIndex", + description: "Account selector within the product subtree.", + }, + ], + }, + { + id: "product-account-tx-payload", + name: "ProductAccountTxPayload", + category: "transaction", + definition: + "export interface ProductAccountTxPayload {\n signer: ProductAccountId;\n genesisHash: GenesisHash;\n callData: HexString;\n extensions: Array;\n txExtVersion: number;\n}", + description: + "Transaction payload for a product account.\n\nContains everything the host needs to construct a signed extrinsic.\nThe signer is a [`ProductAccountId`]; the host resolves the\ncorresponding key pair through its account management layer.", + fields: [ + { + name: "signer", + type: "ProductAccountId", + description: "Product account that will sign the transaction.", + }, + { + name: "genesis_hash", + type: "GenesisHash", + description: "Chain where the transaction will execute.", + }, + { + name: "call_data", + type: "HexString", + description: "SCALE-encoded Call data.", + }, + { + name: "extensions", + type: "Array", + description: "Transaction extensions supplied by the caller.", + }, + { + name: "tx_ext_version", + type: "number", + description: "0 for Extrinsic V4, runtime-supported value for V5.", + }, + ], + }, + { + id: "product-proof-context", + name: "ProductProofContext", + category: "account", + definition: + "export interface ProductProofContext {\n productId: string;\n suffix: DerivationIndex;\n}", + description: + "A product-scoped proof context: a product and a context within it.\n\nHashed (with a `product//` prefix) into the 32-byte context bound\nto a ring VRF proof, so contexts cannot collide across products and the same\nmember key under different contexts yields unlinkable aliases.", + fields: [ + { + name: "product_id", + type: "string", + description: + 'dotNS product identifier (e.g. `"my-product.dot"`) scoping the context.', + }, + { + name: "suffix", + type: "DerivationIndex", + description: + "Selector distinguishing contexts within the product; expands to the\nsame 32-byte derivation index as [`ProductAccountId::derivation_index`].", + }, + ], + }, + { + id: "product-renderer-render-request", + name: "ProductRendererRenderRequest", + category: "renderer", + definition: + "export interface ProductRendererRenderRequest {\n context: RenderContext;\n payload: HexString;\n}", + description: "A body the host needs drawn.", + fields: [ + { + name: "context", + type: "RenderContext", + description: "Where the body lives.", + }, + { + name: "payload", + type: "HexString", + description: "Product-defined payload, opaque to the host.", + }, + ], + }, + { + id: "raw-payload", + name: "RawPayload", + category: "signing", + definition: + 'export type RawPayload =\n | { tag: "Bytes"; value: { bytes: HexString } }\n | { tag: "Payload"; value: { payload: string } }\n;', + description: "Raw data to sign -- either binary bytes or a string message.", + variants: [ + { + name: "Bytes", + type: '{ tag: "Bytes"; value: { bytes: HexString } }', + description: "Raw binary data to sign.", + }, + { + name: "Payload", + type: '{ tag: "Payload"; value: { payload: string } }', + description: "String message to sign.", + }, + ], + }, + { + id: "registered-ring-vrf-key", + name: "RegisteredRingVrfKey", + category: "account", + definition: + "export interface RegisteredRingVrfKey {\n handle: ProductAccountId;\n rings: Array;\n publicKey?: RingVrfPublicKey;\n}", + description: "A registered ring-VRF key entry.", + fields: [ + { + name: "handle", + type: "ProductAccountId", + description: "Stable public name of the key.", + }, + { + name: "rings", + type: "Array", + description: "Rings the owning product declared this key for.", + }, + { + name: "public_key", + type: "RingVrfPublicKey | undefined", + description: + "Present when the caller owns the key or requested/granted disclosure.", + }, + ], + }, + { + id: "remote-chain-head-body-request", + name: "RemoteChainHeadBodyRequest", + category: "chain", + definition: + "export interface RemoteChainHeadBodyRequest {\n genesisHash: HexString;\n followSubscriptionId: string;\n hash: HexString;\n}", + description: "Request to fetch the body of a pinned block.", + fields: [ + { + name: "genesis_hash", + type: "HexString", + description: "Chain genesis hash.", + }, + { + name: "follow_subscription_id", + type: "string", + description: "Follow subscription identifier.", + }, + { + name: "hash", + type: "HexString", + description: "Block hash.", + }, + ], + }, + { + id: "remote-chain-head-body-response", + name: "RemoteChainHeadBodyResponse", + category: "chain", + definition: + "export interface RemoteChainHeadBodyResponse {\n operation: OperationStartedResult;\n}", + description: "Response to a body request; results arrive as follow events.", + fields: [ + { + name: "operation", + type: "OperationStartedResult", + description: "Started operation result.", + }, + ], + }, + { + id: "remote-chain-head-call-request", + name: "RemoteChainHeadCallRequest", + category: "chain", + definition: + "export interface RemoteChainHeadCallRequest {\n genesisHash: HexString;\n followSubscriptionId: string;\n hash: HexString;\n function: string;\n callParameters: HexString;\n}", + description: "Request to invoke a runtime call at a pinned block.", + fields: [ + { + name: "genesis_hash", + type: "HexString", + description: "Chain genesis hash.", + }, + { + name: "follow_subscription_id", + type: "string", + description: "Follow subscription identifier.", + }, + { + name: "hash", + type: "HexString", + description: "Block hash.", + }, + { + name: "function", + type: "string", + description: "Runtime API function name.", + }, + { + name: "call_parameters", + type: "HexString", + description: "SCALE-encoded call parameters.", + }, + ], + }, + { + id: "remote-chain-head-call-response", + name: "RemoteChainHeadCallResponse", + category: "chain", + definition: + "export interface RemoteChainHeadCallResponse {\n operation: OperationStartedResult;\n}", + description: + "Response to a runtime call request; the output arrives as a follow event.", + fields: [ + { + name: "operation", + type: "OperationStartedResult", + description: "Started operation result.", + }, + ], + }, + { + id: "remote-chain-head-continue-request", + name: "RemoteChainHeadContinueRequest", + category: "chain", + definition: + "export interface RemoteChainHeadContinueRequest {\n genesisHash: HexString;\n followSubscriptionId: string;\n operationId: string;\n}", + description: "Request to continue a paused chain-head operation.", + fields: [ + { + name: "genesis_hash", + type: "HexString", + description: "Chain genesis hash.", + }, + { + name: "follow_subscription_id", + type: "string", + description: "Follow subscription identifier.", + }, + { + name: "operation_id", + type: "string", + description: "Operation identifier.", + }, + ], + }, + { + id: "remote-chain-head-follow-item", + name: "RemoteChainHeadFollowItem", + category: "chain", + definition: + 'export type RemoteChainHeadFollowItem =\n | { tag: "Initialized"; value: { finalizedBlockHashes: Array; finalizedBlockRuntime?: RuntimeType } }\n | { tag: "NewBlock"; value: { blockHash: HexString; parentBlockHash: HexString; newRuntime?: RuntimeType } }\n | { tag: "BestBlockChanged"; value: { bestBlockHash: HexString } }\n | { tag: "Finalized"; value: { finalizedBlockHashes: Array; prunedBlockHashes: Array } }\n | { tag: "OperationBodyDone"; value: { operationId: string; value: Array } }\n | { tag: "OperationCallDone"; value: { operationId: string; output: HexString } }\n | { tag: "OperationStorageItems"; value: { operationId: string; items: Array } }\n | { tag: "OperationStorageDone"; value: { operationId: string } }\n | { tag: "OperationWaitingForContinue"; value: { operationId: string } }\n | { tag: "OperationInaccessible"; value: { operationId: string } }\n | { tag: "OperationError"; value: { operationId: string; error: string } }\n | { tag: "Stop"; value?: undefined }\n;', + description: "Event emitted on a chain-head follow subscription.", + variants: [ + { + name: "Initialized", + type: '{ tag: "Initialized"; value: { finalizedBlockHashes: Array; finalizedBlockRuntime?: RuntimeType } }', + description: + "First event of the subscription, describing the current finalized blocks.", + }, + { + name: "NewBlock", + type: '{ tag: "NewBlock"; value: { blockHash: HexString; parentBlockHash: HexString; newRuntime?: RuntimeType } }', + description: "A new non-finalized block was announced.", + }, + { + name: "BestBlockChanged", + type: '{ tag: "BestBlockChanged"; value: { bestBlockHash: HexString } }', + description: "The best block has changed.", + }, + { + name: "Finalized", + type: '{ tag: "Finalized"; value: { finalizedBlockHashes: Array; prunedBlockHashes: Array } }', + description: "One or more blocks were finalized.", + }, + { + name: "OperationBodyDone", + type: '{ tag: "OperationBodyDone"; value: { operationId: string; value: Array } }', + description: "A body operation completed.", + }, + { + name: "OperationCallDone", + type: '{ tag: "OperationCallDone"; value: { operationId: string; output: HexString } }', + description: "A runtime call operation completed.", + }, + { + name: "OperationStorageItems", + type: '{ tag: "OperationStorageItems"; value: { operationId: string; items: Array } }', + description: "A storage operation produced a batch of results.", + }, + { + name: "OperationStorageDone", + type: '{ tag: "OperationStorageDone"; value: { operationId: string } }', + description: "A storage operation finished emitting results.", + }, + { + name: "OperationWaitingForContinue", + type: '{ tag: "OperationWaitingForContinue"; value: { operationId: string } }', + description: + "A storage operation is paused until the product requests continuation.", + }, + { + name: "OperationInaccessible", + type: '{ tag: "OperationInaccessible"; value: { operationId: string } }', + description: + "The operation failed because the required data was not accessible; it can be retried.", + }, + { + name: "OperationError", + type: '{ tag: "OperationError"; value: { operationId: string; error: string } }', + description: "The operation failed with an error.", + }, + { + name: "Stop", + type: '{ tag: "Stop"; value?: undefined }', + description: + "The subscription was stopped by the host and is no longer valid.", + }, + ], + }, + { + id: "remote-chain-head-follow-request", + name: "RemoteChainHeadFollowRequest", + category: "chain", + definition: + "export interface RemoteChainHeadFollowRequest {\n genesisHash: HexString;\n withRuntime: boolean;\n}", + description: "Request to start a chain-head follow subscription.", + fields: [ + { + name: "genesis_hash", + type: "HexString", + description: "Chain genesis hash.", + }, + { + name: "with_runtime", + type: "boolean", + description: "Whether to include runtime information in events.", + }, + ], + }, + { + id: "remote-chain-head-header-request", + name: "RemoteChainHeadHeaderRequest", + category: "chain", + definition: + "export interface RemoteChainHeadHeaderRequest {\n genesisHash: HexString;\n followSubscriptionId: string;\n hash: HexString;\n}", + description: "Request to fetch the header of a pinned block.", + fields: [ + { + name: "genesis_hash", + type: "HexString", + description: "Chain genesis hash.", + }, + { + name: "follow_subscription_id", + type: "string", + description: "Follow subscription identifier.", + }, + { + name: "hash", + type: "HexString", + description: "Block hash.", + }, + ], + }, + { + id: "remote-chain-head-header-response", + name: "RemoteChainHeadHeaderResponse", + category: "chain", + definition: + "export interface RemoteChainHeadHeaderResponse {\n header?: HexString;\n}", + description: "Response containing the requested block header.", + fields: [ + { + name: "header", + type: "HexString | undefined", + description: "SCALE-encoded block header.", + }, + ], + }, + { + id: "remote-chain-head-stop-operation-request", + name: "RemoteChainHeadStopOperationRequest", + category: "chain", + definition: + "export interface RemoteChainHeadStopOperationRequest {\n genesisHash: HexString;\n followSubscriptionId: string;\n operationId: string;\n}", + description: "Request to stop an in-progress chain-head operation.", + fields: [ + { + name: "genesis_hash", + type: "HexString", + description: "Chain genesis hash.", + }, + { + name: "follow_subscription_id", + type: "string", + description: "Follow subscription identifier.", + }, + { + name: "operation_id", + type: "string", + description: "Operation identifier.", + }, + ], + }, + { + id: "remote-chain-head-storage-request", + name: "RemoteChainHeadStorageRequest", + category: "chain", + definition: + "export interface RemoteChainHeadStorageRequest {\n genesisHash: HexString;\n followSubscriptionId: string;\n hash: HexString;\n items: Array;\n childTrie?: HexString;\n}", + description: "Request to query storage at a pinned block.", + fields: [ + { + name: "genesis_hash", + type: "HexString", + description: "Chain genesis hash.", + }, + { + name: "follow_subscription_id", + type: "string", + description: "Follow subscription identifier.", + }, + { + name: "hash", + type: "HexString", + description: "Block hash.", + }, + { + name: "items", + type: "Array", + description: "Storage items to query.", + }, + { + name: "child_trie", + type: "HexString | undefined", + description: "Optional child trie.", + }, + ], + }, + { + id: "remote-chain-head-storage-response", + name: "RemoteChainHeadStorageResponse", + category: "chain", + definition: + "export interface RemoteChainHeadStorageResponse {\n operation: OperationStartedResult;\n}", + description: + "Response to a storage request; results arrive as follow events.", + fields: [ + { + name: "operation", + type: "OperationStartedResult", + description: "Started operation result.", + }, + ], + }, + { + id: "remote-chain-head-unpin-request", + name: "RemoteChainHeadUnpinRequest", + category: "chain", + definition: + "export interface RemoteChainHeadUnpinRequest {\n genesisHash: HexString;\n followSubscriptionId: string;\n hashes: Array;\n}", + description: "Request to release pinned blocks.", + fields: [ + { + name: "genesis_hash", + type: "HexString", + description: "Chain genesis hash.", + }, + { + name: "follow_subscription_id", + type: "string", + description: "Follow subscription identifier.", + }, + { + name: "hashes", + type: "Array", + description: "Block hashes to unpin.", + }, + ], + }, + { + id: "remote-chain-info-error", + name: "RemoteChainInfoError", + category: "chain", + definition: + 'export type RemoteChainInfoError =\n | { tag: "NotSupported"; value?: undefined }\n | { tag: "Unknown"; value: GenericError }\n;', + description: "Error from [`crate::api::Chain::get_chain_info`].", + variants: [ + { + name: "NotSupported", + type: '{ tag: "NotSupported"; value?: undefined }', + description: "The host does not serve the requested chain.", + }, + { + name: "Unknown", + type: '{ tag: "Unknown"; value: GenericError }', + description: "Catch-all.", + }, + ], + }, + { + id: "remote-chain-info-request", + name: "RemoteChainInfoRequest", + category: "chain", + definition: + "export interface RemoteChainInfoRequest {\n chain: ChainIdentifier;\n}", + description: + "Request to resolve one chain identifier against the host's environment.", + fields: [ + { + name: "chain", + type: "ChainIdentifier", + description: "Chain to resolve.", + }, + ], + }, + { + id: "remote-chain-info-response", + name: "RemoteChainInfoResponse", + category: "chain", + definition: + "export interface RemoteChainInfoResponse {\n network: string;\n chain: ChainIdentifier;\n genesisHash: HexString;\n}", + description: "Response carrying the resolved chain data.", + fields: [ + { + name: "network", + type: "string", + description: + 'Ecosystem the host is configured for, e.g. "polkadot", "kusama", "paseo".', + }, + { + name: "chain", + type: "ChainIdentifier", + description: "Chain this response resolves, echoed from the request.", + }, + { + name: "genesis_hash", + type: "HexString", + description: + "Genesis hash identifying the chain in all chain-scoped calls.", + }, + ], + }, + { + id: "remote-chain-spec-chain-name-request", + name: "RemoteChainSpecChainNameRequest", + category: "chain", + definition: + "export interface RemoteChainSpecChainNameRequest {\n genesisHash: HexString;\n}", + description: "Request for the display name of a chain.", + fields: [ + { + name: "genesis_hash", + type: "HexString", + description: "Chain genesis hash.", + }, + ], + }, + { + id: "remote-chain-spec-chain-name-response", + name: "RemoteChainSpecChainNameResponse", + category: "chain", + definition: + "export interface RemoteChainSpecChainNameResponse {\n chainName: string;\n}", + description: "Response containing the chain display name.", + fields: [ + { + name: "chain_name", + type: "string", + description: "Chain display name.", + }, + ], + }, + { + id: "remote-chain-spec-genesis-hash-request", + name: "RemoteChainSpecGenesisHashRequest", + category: "chain", + definition: + "export interface RemoteChainSpecGenesisHashRequest {\n genesisHash: HexString;\n}", + description: "Request for the canonical genesis hash of a chain.", + fields: [ + { + name: "genesis_hash", + type: "HexString", + description: "Chain genesis hash requested by the product.", + }, + ], + }, + { + id: "remote-chain-spec-genesis-hash-response", + name: "RemoteChainSpecGenesisHashResponse", + category: "chain", + definition: + "export interface RemoteChainSpecGenesisHashResponse {\n genesisHash: HexString;\n}", + description: "Response containing the canonical genesis hash.", + fields: [ + { + name: "genesis_hash", + type: "HexString", + description: "Chain genesis hash.", + }, + ], + }, + { + id: "remote-chain-spec-properties-request", + name: "RemoteChainSpecPropertiesRequest", + category: "chain", + definition: + "export interface RemoteChainSpecPropertiesRequest {\n genesisHash: HexString;\n}", + description: "Request for the JSON-encoded properties of a chain.", + fields: [ + { + name: "genesis_hash", + type: "HexString", + description: "Chain genesis hash.", + }, + ], + }, + { + id: "remote-chain-spec-properties-response", + name: "RemoteChainSpecPropertiesResponse", + category: "chain", + definition: + "export interface RemoteChainSpecPropertiesResponse {\n properties: string;\n}", + description: "Response containing the chain properties.", + fields: [ + { + name: "properties", + type: "string", + description: "JSON-encoded properties.", + }, + ], + }, + { + id: "remote-chain-transaction-broadcast-request", + name: "RemoteChainTransactionBroadcastRequest", + category: "chain", + definition: + "export interface RemoteChainTransactionBroadcastRequest {\n genesisHash: HexString;\n transaction: HexString;\n}", + description: "Request to broadcast a signed transaction.", + fields: [ + { + name: "genesis_hash", + type: "HexString", + description: "Chain genesis hash.", + }, + { + name: "transaction", + type: "HexString", + description: "Signed transaction bytes.", + }, + ], + }, + { + id: "remote-chain-transaction-broadcast-response", + name: "RemoteChainTransactionBroadcastResponse", + category: "chain", + definition: + "export interface RemoteChainTransactionBroadcastResponse {\n operationId?: string;\n}", + description: "Response to a transaction broadcast request.", + fields: [ + { + name: "operation_id", + type: "string | undefined", + description: "Broadcast operation identifier, if available.", + }, + ], + }, + { + id: "remote-chain-transaction-stop-request", + name: "RemoteChainTransactionStopRequest", + category: "chain", + definition: + "export interface RemoteChainTransactionStopRequest {\n genesisHash: HexString;\n operationId: string;\n}", + description: "Request to stop broadcasting a transaction.", + fields: [ + { + name: "genesis_hash", + type: "HexString", + description: "Chain genesis hash.", + }, + { + name: "operation_id", + type: "string", + description: "Operation identifier of the broadcast to stop.", + }, + ], + }, + { + 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.", + variants: [ + { + name: "Remote", + type: '{ tag: "Remote"; value: { domains: Array } }', + description: + "Outbound HTTP/WebSocket access to a set of domains. External navigation\nuses [`HostDevicePermissionRequest::OpenUrl`] instead.", + }, + { + name: "WebRtc", + type: '{ tag: "WebRtc"; value?: undefined }', + description: + "WebRTC access.\n\nThe container authorizes each peer connection through Rust before its\nfirst network method. Later methods on that connection share the same\ndecision, so a one-use grant permits one connection. New connections\ncheck current permissions without requiring a page reload.\n\nCamera and microphone capture is gated by the OS permission prompts and\n[`HostDevicePermissionRequest`], not by this permission.", + }, + { + name: "ChainSubmit", + type: '{ tag: "ChainSubmit"; value?: undefined }', + description: + "Submitting transactions on behalf of the user via `remote_chain_transaction_broadcast`.", + }, + { + name: "PreimageSubmit", + type: '{ tag: "PreimageSubmit"; value?: undefined }', + description: + "Submitting preimages on behalf of the user via `remote_preimage_submit`.", + }, + { + name: "StatementSubmit", + type: '{ tag: "StatementSubmit"; value?: undefined }', + description: + "Submitting statements on behalf of the user via `remote_statement_store_submit`.", + }, + ], + }, + { + id: "remote-permission-request", + name: "RemotePermissionRequest", + category: "permissions", + definition: + "export interface RemotePermissionRequest {\n permission: RemotePermission;\n}", + description: "remote-permission request (RFC 0002).", + fields: [ + { + name: "permission", + type: "RemotePermission", + description: "Permission requested by the product.", + }, + ], + }, + { + id: "remote-permission-response", + name: "RemotePermissionResponse", + category: "permissions", + definition: + "export interface RemotePermissionResponse {\n granted: boolean;\n}", + description: "Outcome of a remote-permission request.", + fields: [ + { + name: "granted", + type: "boolean", + description: "Whether the permission was granted.", + }, + ], + }, + { + id: "remote-preimage-lookup-subscribe-item", + name: "RemotePreimageLookupSubscribeItem", + category: "preimage", + definition: + "export interface RemotePreimageLookupSubscribeItem {\n value?: HexString;\n}", + description: "Item containing an optional preimage lookup result.", + fields: [ + { + name: "value", + type: "HexString | undefined", + description: "Preimage data, if found.", + }, + ], + }, + { + id: "remote-preimage-lookup-subscribe-request", + name: "RemotePreimageLookupSubscribeRequest", + category: "preimage", + definition: + "export interface RemotePreimageLookupSubscribeRequest {\n key: HexString;\n}", + description: "Request to subscribe to preimage lookup results.", + fields: [ + { + name: "key", + type: "HexString", + description: "Hash of the preimage.", + }, + ], + }, + { + id: "remote-statement-store-create-proof-error", + name: "RemoteStatementStoreCreateProofError", + category: "statement_store", + definition: + 'export type RemoteStatementStoreCreateProofError =\n | { tag: "UnableToSign"; value?: undefined }\n | { tag: "UnknownAccount"; value?: undefined }\n | { tag: "Unknown"; value: { reason: string } }\n;', + description: "Statement proof creation error.", + variants: [ + { + name: "UnableToSign", + type: '{ tag: "UnableToSign"; value?: undefined }', + description: "Signing operation failed.", + }, + { + name: "UnknownAccount", + type: '{ tag: "UnknownAccount"; value?: undefined }', + description: "Account not recognized.", + }, + { + name: "Unknown", + type: '{ tag: "Unknown"; value: { reason: string } }', + description: "Catch-all.", + }, + ], + }, + { + id: "remote-statement-store-create-proof-request", + name: "RemoteStatementStoreCreateProofRequest", + category: "statement_store", + definition: + "export interface RemoteStatementStoreCreateProofRequest {\n productAccountId: ProductAccountId;\n statement: Statement;\n}", + description: "Request to create a cryptographic proof for a statement.", + fields: [ + { + name: "product_account_id", + type: "ProductAccountId", + description: "Product account that should create the proof.", + }, + { + name: "statement", + type: "Statement", + description: "Statement to prove.", + }, + ], + }, + { + id: "remote-statement-store-create-proof-response", + name: "RemoteStatementStoreCreateProofResponse", + category: "statement_store", + definition: + "export interface RemoteStatementStoreCreateProofResponse {\n proof: StatementProof;\n}", + description: "Response containing a statement proof.", + fields: [ + { + name: "proof", + type: "StatementProof", + description: "Created statement proof.", + }, + ], + }, + { + id: "remote-statement-store-subscribe-item", + name: "RemoteStatementStoreSubscribeItem", + category: "statement_store", + definition: + "export interface RemoteStatementStoreSubscribeItem {\n statements: Array;\n isComplete: boolean;\n}", + description: + "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`).", + fields: [ + { + name: "statements", + type: "Array", + description: "Signed statements matching the subscription.", + }, + { + name: "is_complete", + type: "boolean", + description: + "`false` while the host is still streaming the historical dump (more\npages to follow). `true` once the dump is complete; all subsequent\npages are also `true` and carry only newly-arrived statements.", + }, + ], + }, + { + id: "remote-statement-store-subscribe-request", + name: "RemoteStatementStoreSubscribeRequest", + category: "statement_store", + definition: + 'export type RemoteStatementStoreSubscribeRequest =\n | { tag: "MatchAll"; value: Array }\n | { tag: "MatchAny"; value: Array }\n;', + description: + "Request to subscribe to statements via a topic filter (RFC 0008).", + variants: [ + { + name: "MatchAll", + type: '{ tag: "MatchAll"; value: Array }', + description: "AND: statement must contain every listed topic.", + }, + { + name: "MatchAny", + type: '{ tag: "MatchAny"; value: Array }', + description: "OR: statement must contain at least one listed topic.", + }, + ], + }, + { + id: "render-context", + name: "RenderContext", + category: "renderer", + definition: + 'export type RenderContext =\n | { tag: "ChatMessage"; value: { roomId: string; messageId: string; messageType: string } }\n | { tag: "InputWidget"; value: { candidateId: string } }\n | { tag: "PocketCard"; value: { cardId: string } }\n;', + description: + "Where a product-rendered body lives, and the id that names it there.", + variants: [ + { + name: "ChatMessage", + type: '{ tag: "ChatMessage"; value: { roomId: string; messageId: string; messageType: string } }', + description: "A message in a chat room.", + }, + { + name: "InputWidget", + type: '{ tag: "InputWidget"; value: { candidateId: string } }', + description: "A candidate answered to an input query.", + }, + { + name: "PocketCard", + type: '{ tag: "PocketCard"; value: { cardId: string } }', + description: "A card face in the host's Pocket collection.", + }, + ], + }, + { + id: "renderer-node", + name: "RendererNode", + category: "renderer", + definition: + 'export type RendererNode =\n | { tag: "Nil"; value?: undefined }\n | { tag: "String"; value: { text: string } }\n | { tag: "Box"; value: { modifiers: Array; props: BoxProps; children: Array } }\n | { tag: "Column"; value: { modifiers: Array; props: ColumnProps; children: Array } }\n | { tag: "Row"; value: { modifiers: Array; props: RowProps; children: Array } }\n | { tag: "Spacer"; value: { modifiers: Array } }\n | { tag: "Text"; value: { modifiers: Array; props: TextProps; children: Array } }\n | { tag: "Button"; value: { modifiers: Array; props: ButtonProps; children: Array } }\n | { tag: "TextField"; value: { modifiers: Array; props: TextFieldProps } }\n | { tag: "Image"; value: { modifiers: Array; props: ImageProps } }\n | { tag: "Effect"; value: { props: EffectProps; children: Array } }\n;', + description: + "A node in a product-rendered tree. Container variants recurse through\n`children`.", + variants: [ + { + name: "Nil", + type: '{ tag: "Nil"; value?: undefined }', + description: "Draws nothing.", + }, + { + name: "String", + type: '{ tag: "String"; value: { text: string } }', + description: "A text run.", + }, + { + name: "Box", + type: '{ tag: "Box"; value: { modifiers: Array; props: BoxProps; children: Array } }', + description: "Generic container.", + }, + { + name: "Column", + type: '{ tag: "Column"; value: { modifiers: Array; props: ColumnProps; children: Array } }', + description: "Vertical layout.", + }, + { + name: "Row", + type: '{ tag: "Row"; value: { modifiers: Array; props: RowProps; children: Array } }', + description: "Horizontal layout.", + }, + { + name: "Spacer", + type: '{ tag: "Spacer"; value: { modifiers: Array } }', + description: "Flexible space.", + }, + { + name: "Text", + type: '{ tag: "Text"; value: { modifiers: Array; props: TextProps; children: Array } }', + description: "Styled text.", + }, + { + name: "Button", + type: '{ tag: "Button"; value: { modifiers: Array; props: ButtonProps; children: Array } }', + description: "Interactive button.", + }, + { + name: "TextField", + type: '{ tag: "TextField"; value: { modifiers: Array; props: TextFieldProps } }', + description: "Single-line text input.", + }, + { + name: "Image", + type: '{ tag: "Image"; value: { modifiers: Array; props: ImageProps } }', + description: "Image, sized by modifiers.", + }, + { + name: "Effect", + type: '{ tag: "Effect"; value: { props: EffectProps; children: Array } }', + description: "Applies its effect to its children.", + }, + ], + }, + { + id: "resource-allocation-error", + name: "ResourceAllocationError", + category: "resource_allocation", + definition: + 'export type ResourceAllocationError =\n | { tag: "Unknown"; value: { reason: string } }\n;', + description: "Error from [`crate::api::ResourceAllocation::request`].", + variants: [ + { + name: "Unknown", + type: '{ tag: "Unknown"; value: { reason: string } }', + description: "Catch-all.", + }, + ], + }, + { + id: "ring-location", + name: "RingLocation", + category: "account", + definition: + "export interface RingLocation {\n chainId: GenesisHash;\n junctions: Array;\n}", + description: + "Locates a ring for ring VRF operations using only identifiers that are\nstable across membership changes.", + fields: [ + { + name: "chain_id", + type: "GenesisHash", + description: "Genesis hash of the chain hosting the ring.", + }, + { + name: "junctions", + type: "Array", + description: "Path addressing the ring within the chain.", + }, + ], + }, + { + id: "ring-location-junction", + name: "RingLocationJunction", + category: "account", + definition: + 'export type RingLocationJunction =\n | { tag: "PalletInstance"; value: number }\n | { tag: "CollectionId"; value: HexString }\n;', + description: + "A single step in a [`RingLocation`] path, addressing a ring within a chain.", + variants: [ + { + name: "PalletInstance", + type: '{ tag: "PalletInstance"; value: number }', + description: "Pallet instance hosting the ring collection.", + }, + { + name: "CollectionId", + type: '{ tag: "CollectionId"; value: HexString }', + description: "Ring collection identifier within the pallet.", + }, + ], + }, + { + id: "ring-vrf-key-disclosure", + name: "RingVrfKeyDisclosure", + category: "account", + definition: + 'export type RingVrfKeyDisclosure = "Anonymized" | "PublicKey";', + description: "How much of a registry entry the caller asks for.", + variants: [ + { + name: "Anonymized", + type: '{ tag: "Anonymized"; value?: undefined }', + description: "Handle and declared rings only.", + }, + { + name: "PublicKey", + type: '{ tag: "PublicKey"; value?: undefined }', + description: "Include the member public key.", + }, + ], + }, + { + id: "ring-vrf-public-key", + name: "RingVrfPublicKey", + category: "account", + definition: "export type RingVrfPublicKey = HexString;", + description: "Ring-VRF member public key.", + }, + { + id: "row-props", + name: "RowProps", + category: "renderer", + definition: + "export interface RowProps {\n verticalAlignment?: VerticalAlignment;\n horizontalArrangement?: Arrangement;\n}", + description: "Properties of a `Row`.", + fields: [ + { + name: "vertical_alignment", + type: "VerticalAlignment | undefined", + description: "Cross-axis alignment of children.", + }, + { + name: "horizontal_arrangement", + type: "Arrangement | undefined", + description: "Main-axis distribution of children.", + }, + ], + }, + { + id: "runtime-api", + name: "RuntimeApi", + category: "chain", + definition: + "export interface RuntimeApi {\n name: string;\n version: number;\n}", + description: "One entry of a runtime's supported API list.", + fields: [ + { + name: "name", + type: "string", + description: "Runtime API name.", + }, + { + name: "version", + type: "number", + description: "Runtime API version.", + }, + ], + }, + { + id: "runtime-spec", + name: "RuntimeSpec", + category: "chain", + definition: + "export interface RuntimeSpec {\n specName: string;\n implName: string;\n specVersion: number;\n implVersion: number;\n transactionVersion?: number;\n apis: Array;\n}", + description: "Runtime version information for a block's runtime.", + fields: [ + { + name: "spec_name", + type: "string", + description: "Specification name.", + }, + { + name: "impl_name", + type: "string", + description: "Implementation name.", + }, + { + name: "spec_version", + type: "number", + description: "Spec version number.", + }, + { + name: "impl_version", + type: "number", + description: "Implementation version.", + }, + { + name: "transaction_version", + type: "number | undefined", + description: "Transaction format version.", + }, + { + name: "apis", + type: "Array", + description: "Supported runtime APIs.", + }, + ], + }, + { + id: "runtime-type", + name: "RuntimeType", + category: "chain", + definition: + 'export type RuntimeType =\n | { tag: "Valid"; value: RuntimeSpec }\n | { tag: "Invalid"; value: { error: string } }\n;', + description: + "Runtime attached to follow events, either a decoded spec or a decode error.", + variants: [ + { + name: "Valid", + type: '{ tag: "Valid"; value: RuntimeSpec }', + description: "Runtime spec decoded successfully.", + }, + { + name: "Invalid", + type: '{ tag: "Invalid"; value: { error: string } }', + description: "The runtime could not be decoded.", + }, + ], + }, + { + id: "shape", + name: "Shape", + category: "renderer", + definition: + 'export type Shape =\n | { tag: "Rounded"; value: Size }\n | { tag: "Circle"; value?: undefined }\n | { tag: "Square"; value?: undefined }\n;', + description: "Outline of a background or border.", + variants: [ + { + name: "Rounded", + type: '{ tag: "Rounded"; value: Size }', + description: "Rounded corners with the given radius.", + }, + { + name: "Circle", + type: '{ tag: "Circle"; value?: undefined }', + description: "Circular shape.", + }, + { + name: "Square", + type: '{ tag: "Square"; value?: undefined }', + description: "Square corners.", + }, + ], + }, + { + id: "signed-statement", + name: "SignedStatement", + category: "statement_store", + definition: + "export interface SignedStatement {\n proof: StatementProof;\n decryptionKey?: HexString;\n expiry?: bigint;\n channel?: HexString;\n topics: Array;\n data?: HexString;\n}", + description: "A statement with a required (not optional) proof.", + fields: [ + { + name: "proof", + type: "StatementProof", + description: "Required cryptographic proof.", + }, + { + name: "decryption_key", + type: "HexString | undefined", + description: "Optional decryption key.", + }, + { + name: "expiry", + type: "bigint | undefined", + description: "Optional Unix timestamp expiry.", + }, + { + name: "channel", + type: "HexString | undefined", + description: "Optional channel.", + }, + { + name: "topics", + type: "Array", + description: "[u8; 32] tags.", + }, + { + name: "data", + type: "HexString | undefined", + description: "Optional data payload.", + }, + ], + }, + { + id: "size", + name: "Size", + category: "renderer", + definition: "export type Size = number | bigint;", + description: "A size in logical pixels, SCALE-encoded as `Compact`.", + }, + { + id: "statement", + name: "Statement", + category: "statement_store", + definition: + "export interface Statement {\n proof?: StatementProof;\n decryptionKey?: HexString;\n expiry?: bigint;\n channel?: HexString;\n topics: Array;\n data?: HexString;\n}", + description: "A statement with optional proof and metadata.", + fields: [ + { + name: "proof", + type: "StatementProof | undefined", + description: "Optional cryptographic proof.", + }, + { + name: "decryption_key", + type: "HexString | undefined", + description: "Optional decryption key.", + }, + { + name: "expiry", + type: "bigint | undefined", + description: "Optional Unix timestamp expiry.", + }, + { + name: "channel", + type: "HexString | undefined", + description: "Optional channel.", + }, + { + name: "topics", + type: "Array", + description: "[u8; 32] tags.", + }, + { + name: "data", + type: "HexString | undefined", + description: "Optional data payload.", + }, + ], + }, + { + id: "statement-proof", + name: "StatementProof", + category: "statement_store", + definition: + 'export type StatementProof =\n | { tag: "Sr25519"; value: { signature: HexString; signer: HexString } }\n | { tag: "Ed25519"; value: { signature: HexString; signer: HexString } }\n | { tag: "Ecdsa"; value: { signature: HexString; signer: HexString } }\n | { tag: "OnChain"; value: { who: HexString; blockHash: HexString; event: bigint } }\n;', + description: "Cryptographic proof for a statement.", + variants: [ + { + name: "Sr25519", + type: '{ tag: "Sr25519"; value: { signature: HexString; signer: HexString } }', + description: "Sr25519 signature proof.", + }, + { + name: "Ed25519", + type: '{ tag: "Ed25519"; value: { signature: HexString; signer: HexString } }', + description: "Ed25519 signature proof.", + }, + { + name: "Ecdsa", + type: '{ tag: "Ecdsa"; value: { signature: HexString; signer: HexString } }', + description: "ECDSA signature proof.", + }, + { + name: "OnChain", + type: '{ tag: "OnChain"; value: { who: HexString; blockHash: HexString; event: bigint } }', + description: "On-chain event proof.", + }, + ], + }, + { + id: "storage-query-item", + name: "StorageQueryItem", + category: "chain", + definition: + "export interface StorageQueryItem {\n key: HexString;\n queryType: StorageQueryType;\n}", + description: "A single key query within a chain-head storage request.", + fields: [ + { + name: "key", + type: "HexString", + description: "Storage key to query.", + }, + { + name: "query_type", + type: "StorageQueryType", + description: "What to return.", + }, + ], + }, + { + id: "storage-query-type", + name: "StorageQueryType", + category: "chain", + definition: + 'export type StorageQueryType = "Value" | "Hash" | "ClosestDescendantMerkleValue" | "DescendantsValues" | "DescendantsHashes";', + description: "What a chain-head storage query returns for a key.", + variants: [ + { + name: "Value", + type: '{ tag: "Value"; value?: undefined }', + description: "Return the value under the key.", + }, + { + name: "Hash", + type: '{ tag: "Hash"; value?: undefined }', + description: "Return the hash of the value under the key.", + }, + { + name: "ClosestDescendantMerkleValue", + type: '{ tag: "ClosestDescendantMerkleValue"; value?: undefined }', + description: + "Return the Merkle value of the closest descendant of the key.", + }, + { + name: "DescendantsValues", + type: '{ tag: "DescendantsValues"; value?: undefined }', + description: "Return the values of the key and all its descendants.", + }, + { + name: "DescendantsHashes", + type: '{ tag: "DescendantsHashes"; value?: undefined }', + description: + "Return the value hashes of the key and all its descendants.", + }, + ], + }, + { + id: "storage-result-item", + name: "StorageResultItem", + category: "chain", + definition: + "export interface StorageResultItem {\n key: HexString;\n value?: HexString;\n hash?: HexString;\n closestDescendantMerkleValue?: HexString;\n}", + description: "Result for one queried storage key.", + fields: [ + { + name: "key", + type: "HexString", + description: "The queried key.", + }, + { + name: "value", + type: "HexString | undefined", + description: "Value, if requested.", + }, + { + name: "hash", + type: "HexString | undefined", + description: "Hash, if requested.", + }, + { + name: "closest_descendant_merkle_value", + type: "HexString | undefined", + description: "Merkle value, if requested.", + }, + ], + }, + { + id: "text-field-props", + name: "TextFieldProps", + category: "renderer", + definition: + "export interface TextFieldProps {\n text: string;\n placeholder?: string;\n label?: string;\n enabled?: boolean;\n valueChangeAction?: string;\n}", + description: "Properties of a `TextField`.", + fields: [ + { + name: "text", + type: "string", + description: "Current value.", + }, + { + name: "placeholder", + type: "string | undefined", + description: "Shown when the value is empty.", + }, + { + name: "label", + type: "string | undefined", + description: "Field label.", + }, + { + name: "enabled", + type: "boolean | undefined", + description: + "Whether the field accepts input. Absent leaves the default to the host.", + }, + { + name: "value_change_action", + type: "string | undefined", + description: + "Action triggered on every value change. The action carries the new\nvalue as UTF-8 bytes, with no length prefix.", + }, + ], + }, + { + id: "text-props", + name: "TextProps", + category: "renderer", + definition: + "export interface TextProps {\n style?: TypographyStyle;\n color?: ColorToken;\n}", + description: "Properties of a `Text`.", + fields: [ + { + name: "style", + type: "TypographyStyle | undefined", + description: "Typography preset.", + }, + { + name: "color", + type: "ColorToken | undefined", + description: "Text color.", + }, + ], + }, + { + id: "theme-name", + name: "ThemeName", + category: "theme", + definition: + 'export type ThemeName =\n | { tag: "Custom"; value: string }\n | { tag: "Default"; value?: undefined }\n;', + description: "Identifies a named theme.", + variants: [ + { + name: "Custom", + type: '{ tag: "Custom"; value: string }', + description: "A custom named theme.", + }, + { + name: "Default", + type: '{ tag: "Default"; value?: undefined }', + description: "The host's default theme.", + }, + ], + }, + { + id: "theme-variant", + name: "ThemeVariant", + category: "theme", + definition: 'export type ThemeVariant = "Light" | "Dark";', + description: "Light or dark variant.", + variants: [ + { + name: "Light", + type: '{ tag: "Light"; value?: undefined }', + description: "Light appearance.", + }, + { + name: "Dark", + type: '{ tag: "Dark"; value?: undefined }', + description: "Dark appearance.", + }, + ], + }, + { + id: "topic", + name: "Topic", + category: "statement_store", + definition: "export type Topic = HexString;", + description: "32-byte statement topic.", + }, + { + id: "tx-payload-extension", + name: "TxPayloadExtension", + category: "transaction", + definition: + "export interface TxPayloadExtension {\n id: string;\n extra: HexString;\n additionalSigned: HexString;\n}", + description: "A signed extension for a transaction payload.", + fields: [ + { + name: "id", + type: "string", + description: 'Extension name (e.g., `"CheckSpecVersion"`).', + }, + { + name: "extra", + type: "HexString", + description: "SCALE-encoded extra data (in extrinsic body).", + }, + { + name: "additional_signed", + type: "HexString", + description: "SCALE-encoded implicit data (signed, not in body).", + }, + ], + }, + { + id: "typography-style", + name: "TypographyStyle", + category: "renderer", + definition: + 'export type TypographyStyle = "HeadlineLarge" | "TitleMediumRegular" | "BodyLargeRegular" | "BodyMediumRegular" | "BodySmallRegular";', + description: "Typography presets, resolved by the host's design system.", + variants: [ + { + name: "HeadlineLarge", + type: '{ tag: "HeadlineLarge"; value?: undefined }', + description: "Large headline text.", + }, + { + name: "TitleMediumRegular", + type: '{ tag: "TitleMediumRegular"; value?: undefined }', + description: "Medium title text, regular weight.", + }, + { + name: "BodyLargeRegular", + type: '{ tag: "BodyLargeRegular"; value?: undefined }', + description: "Large body text, regular weight.", + }, + { + name: "BodyMediumRegular", + type: '{ tag: "BodyMediumRegular"; value?: undefined }', + description: "Medium body text, regular weight.", + }, + { + name: "BodySmallRegular", + type: '{ tag: "BodySmallRegular"; value?: undefined }', + description: "Small body text, regular weight.", + }, + ], + }, + { + id: "v-01-host-local-storage-read-error", + name: "V01HostLocalStorageReadError", + category: "local_storage", + definition: + 'export type V01HostLocalStorageReadError =\n | { tag: "Full"; value?: undefined }\n | { tag: "Unknown"; value: { reason: string } }\n;', + description: "Local storage operation error.", + variants: [ + { + name: "Full", + type: '{ tag: "Full"; value?: undefined }', + description: "Storage quota exceeded.", + }, + { + name: "Unknown", + type: '{ tag: "Unknown"; value: { reason: string } }', + description: "Catch-all.", + }, + ], + }, + { + id: "v-01-host-local-storage-read-request", + name: "V01HostLocalStorageReadRequest", + category: "local_storage", + definition: + "export interface V01HostLocalStorageReadRequest {\n key: string;\n}", + description: "Request to read a local storage value.", + fields: [ + { + name: "key", + type: "string", + description: "Storage key to read.", + }, + ], + }, + { + id: "vertical-alignment", + name: "VerticalAlignment", + category: "renderer", + definition: 'export type VerticalAlignment = "Top" | "Center" | "Bottom";', + description: "Cross-axis alignment of `Row` children.", + variants: [ + { + name: "Top", + type: '{ tag: "Top"; value?: undefined }', + description: "Align to the top.", + }, + { + name: "Center", + type: '{ tag: "Center"; value?: undefined }', + description: "Center vertically.", + }, + { + name: "Bottom", + type: '{ tag: "Bottom"; value?: undefined }', + description: "Align to the bottom.", + }, + ], + }, + { + id: "vrf-signature", + name: "VrfSignature", + category: "account", + definition: + "export interface VrfSignature {\n preOutput: HexString;\n proof: HexString;\n}", + description: + "An sr25519 (schnorrkel) VRF signature: the VRF pre-output and its proof.", + fields: [ + { + name: "pre_output", + type: "HexString", + description: "schnorrkel `VRFPreOut` — the 32-byte VRF output point.", + }, + { + name: "proof", + type: "HexString", + description: "schnorrkel `VRFProof` — the 64-byte DLEQ proof.", + }, + ], + }, + { + id: "vrf-transcript-item", + name: "VrfTranscriptItem", + category: "account", + definition: + "export interface VrfTranscriptItem {\n label: HexString;\n value: HexString;\n}", + description: + "One `append_message` call replayed against the signing transcript.", + fields: [ + { + name: "label", + type: "HexString", + description: "Merlin `append_message` label.", + }, + { + name: "value", + type: "HexString", + description: "Merlin `append_message` value.", + }, + ], + }, +]; diff --git a/package-lock.json b/package-lock.json index b34eaeef99..84dd6d8a48 100644 --- a/package-lock.json +++ b/package-lock.json @@ -18,7 +18,7 @@ }, "js/packages/truapi": { "name": "@parity/truapi", - "version": "0.20.0", + "version": "0.21.0", "license": "MIT", "dependencies": { "@noble/hashes": "^2.2.0", @@ -32,10 +32,10 @@ }, "js/packages/truapi-debugger": { "name": "@parity/truapi-debugger", - "version": "0.1.7", + "version": "0.1.8", "license": "MIT", "dependencies": { - "@parity/truapi": "^0.20.0" + "@parity/truapi": "^0.21.0" }, "devDependencies": { "@types/bun": "^1.3.0", @@ -59,11 +59,11 @@ }, "js/packages/truapi-host": { "name": "@parity/truapi-host", - "version": "0.20.0", + "version": "0.21.0", "license": "MIT", "dependencies": { "@noble/hashes": "^2.2.0", - "@parity/truapi": "^0.20.0", + "@parity/truapi": "^0.21.0", "neverthrow": "^8.2.0" }, "devDependencies": { @@ -88,7 +88,7 @@ }, "js/packages/truapi-provider": { "name": "@parity/truapi-provider", - "version": "0.2.1", + "version": "0.2.2", "license": "MIT AND Apache-2.0" }, "js/packages/truapi/node_modules/typescript": { diff --git a/rust/crates/truapi-host-cli/Cargo.toml b/rust/crates/truapi-host-cli/Cargo.toml index 741394da8e..ef3ab5835e 100644 --- a/rust/crates/truapi-host-cli/Cargo.toml +++ b/rust/crates/truapi-host-cli/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "truapi-host-cli" -version = "0.20.0" +version = "0.21.0" edition.workspace = true description = "Headless TrUAPI hosts: a signing-host companion and a pairing host that pair over the real People-chain statement store, for end-to-end testing without an external signer service" license = "MIT" diff --git a/rust/crates/truapi/Cargo.toml b/rust/crates/truapi/Cargo.toml index 1bf8af1339..cb53b75db4 100644 --- a/rust/crates/truapi/Cargo.toml +++ b/rust/crates/truapi/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "truapi" -version = "0.20.0" +version = "0.21.0" edition.workspace = true license.workspace = true description = "TrUAPI trait and type definitions"