diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 7da07904..0bda441e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -280,16 +280,15 @@ jobs: fi - name: Test local XCFramework in the simulator + env: + TRUAPI_USE_LOCAL_BINARY: "1" run: | set -euo pipefail - sed -i '' -E 's/^let useLocalBinary = false$/let useLocalBinary = true/' Package.swift - grep -q '^let useLocalBinary = true$' Package.swift xcodebuild test \ -scheme TrUAPIHost \ -destination 'platform=iOS Simulator,name=iPhone 16,OS=latest' \ -derivedDataPath "$RUNNER_TEMP/TrUAPIHostDerivedData" \ CODE_SIGNING_ALLOWED=NO - git restore Package.swift - name: Publish XCFramework id: ios_publish diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 00000000..8c019447 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,470 @@ +# Changelog + +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.8.0] - 2026-08-10 + +### RFCs + +- **Accepted:** Host chain discovery and name resolution + +### Added + +- implement chain.getChainInfo in the core (#358) +- integrate the Chat modality with the shared Rust core (#326) +- support Extrinsic V5 transaction signing (#333) +- export parse_navigate to native hosts (#340) + +### Changed + +- RFC 0026: Host chain discovery and name resolution (#354) +- Use canonical types over the native FFI (#345) +- iOS host integration (#330) + +### Fixed + +- isolate RFC-0022 session and AutoSigning capabilities (#329) + +## [0.7.0] - 2026-08-04 + +### Added + +- complete RFC-0022 host cutover (#327) + +### Changed + +- @parity/truapi 0.7.0, @parity/truapi-host 0.4.0 (#332) + +## [0.6.0] - 2026-07-31 + +### RFCs + +- **Accepted:** Account key derivations +- **Accepted:** sr25519 VRF signing for product accounts + +### Added + +- Android host adapter (android/truapi-host) + hosts/android submodule (#289) +- implement missing signing host fn (#288) + +### Changed + +- @parity/truapi 0.6.0, @parity/truapi-host 0.3.0 (#325) +- RFC 0023 - Sign VRF (#301) +- RFC 0022: Account key derivations (#296) +- cli host (#264) +- iOS host (#215) +- adopt Send async traits (#312) +- @parity/truapi-host 0.2.1 (#320) + +### Fixed + +- recheck inclusion instead of re-broadcasting on watch stop (#307) +- stop the broadcast operation returned by host (#318) + +## [0.5.1] - 2026-07-21 + +### Changed + +- @parity/truapi 0.5.1 (#302) + +### Fixed + +- run products on legacy hosts (#300) + +## [0.5.0] - 2026-07-20 + +### RFCs + +- **Accepted:** RFC 0004 — Redesign `host_account_create_proof` + +### Changed + +- @parity/truapi 0.5.0, @parity/truapi-host 0.2.0 (#293) +- RFC: Redesign RingLocation in host_account_create_proof (#18) + +### Fixed + +- cover Dotli signing regressions (#291) +- prevent stale generated bindings (#287) + +## [0.4.1] - 2026-07-16 + +### Changed + +- @parity/truapi 0.4.1 (#284) +- @parity/truapi-host 0.1.0 (#278) + +### Fixed + +- treat Firefox's masked "null" ancestor origin as hidden (#283) +- updates in diagnosis report + submit report button (#277) +- create tags through API (#282) +- unblock post-merge workflows (#281) + +## [0.4.0] - 2026-07-15 + +### RFCs + +- **Accepted:** Coinage Payment User Agent API + +### Added + +- build, sign, and submit Bulletin preimages in the core (#270) +- add @parity/truapi-host-wasm runtime (#252) +- generate wasm bridge callbacks (#265) +- add platform runtime and host bridge (#250) +- add wire and chain infrastructure (#256) +- add host logic primitives (#255) +- emit Rust dispatcher, wire table, and host callbacks (#254) +- add host capability traits (#249) +- add testing API and versioned wiring (#248) +- add explorer 0.3.2 version snapshot (#242) + +### Changed + +- @parity/truapi 0.4.0 (#279) + +## [0.3.2] - 2026-06-26 + +### RFCs + +- **Withdrawn:** Extended theme subscribe API + +### Added + +- add @parity/truapi/sandbox bootstrap entry point (#234) +- add explorer 0.3.1 version snapshot (#231) +- version lifecycle tooling (#145) + +### Changed + +- @parity/truapi 0.3.2 +- @parity/truapi 0.3.2 +- Playground e2e harness + SCALE codec additions (#238) +- rename Provider type to WireProvider (#235) +- Update diagnosis compatibility statuses (#233) +- Update playground transaction example for DotNS signer (#220) +- Revert "ci: remove redundant build skip env" +- fix +- Bump the actions group with 11 updates (#199) +- Add explorer v0.3.0 version snapshot +- Delete zizmor logs +- Apply zizmor --fix=all +- Preserve logs on timeout, float copy button, hide editor line numbers +- Annotate subscribe example statement and export generated types in Monaco dts +- Drop diagnosis-report changes; keep only the Rust example fixes +- Fix statement-store subscribe example and multi-line diagnosis details +- update ios report (from #189) +- route type-page links through typePath helper +- update ios report (from #182) +- update android report (from #180) +- update web report (from #178) +- update desktop report (from #175) +- improve examples +- fix +- fixes +- fixes +- fixes +- fixes +- fixes +- tmp +- test +- bundle the static export into a handful of chunks +- ss updates +- drop per-run report timestamp; fix docs +- Drop the per-method cancellation feature +- Cancel a processing diagnosis method from the UI +- Submit diagnosis reports via a pre-filled GitHub issue + +### Fixed + +- use GitHub API to create release tag +- align HostPaymentTopUpError SCALE indices with triangle-js-sdks (#223) +- Simplify the diagnosis run and fix the statement-store submit example (#174) +- remove version bump from cut-version.sh + +### Removed + +- roll back the CoinPayment (Coinage) host API + +## [0.3.0] - 2026-06-03 + +### RFCs + +- **Accepted:** RFC-0020: Remove `context` from `create_transaction` and mirror in Accounts Protocol +- **Accepted:** Add Coins variant to PaymentTopUpSource +- **Accepted:** Extended theme subscribe API +- **Withdrawn:** Host API root account access +- **Withdrawn:** Simple Group Chat + +### Added + +- append to matrix instead of override +- extend theme subscribe API with named themes +- proc-macro envelopes + conversion traits +- add Next variant to Version enum +- diagnosis screen + host compatibility matrix (#143) +- show method examples and deep-link to the hosted playground +- require a ```ts example on every trait method +- add version lifecycle tooling and next/ staging module +- host compatibility matrix page +- codegen-driven explorer site with version snapshots (#130) +- implement RFC-0020 Rust types for create_transaction +- add host-side codegen and @parity/truapi-host package (#77) + +### Changed + +- Use Sr25519 secret keys in PaymentTopUpSource +- Always rebuild the compatibility matrix from the reports alone +- Regenerate compatibility matrix: drop skipped Coin Payment, restore host order +- fix +- fix +- update +- fixes +- Add 'make explorer' to run the explorer dev server locally +- update +- Add 'make matrix' to regenerate the compatibility matrix +- Track per-host diagnosis reports in version control +- update diagnostics +- one at a time +- clean up +- fixes +- improved errors +- update dotli sha +- Replay diagnosis methods and streamline the report action +- auto-test removal +- Add report error column, raise unary timeout, mark Signing/create_transaction web pass +- Expand diagnosis failures, link method breadcrumb to the index +- Deep-link diagnosis, fix host-mode detection, use chain const in signing examples +- improve playground ux +- fix up +- fix up compatibility tests +- @parity/truapi 0.3.0 +- cut v0.3.0 +- fix +- reduce payment +- IOS report +- simplify matrix builder and host-mode detection +- Update report matrix with android +- Set top_up example amount to 10000 +- drop redundant playground link from method example +- Add compatibility parsed reports for web and desktop +- simplify for now +- remove unused Version enum and IntoVersion trait +- update versioned types +- Update RFC index +- Specify deployment environment for Playground (#142) +- Update README references +- Parse diagnosis reports into matrix +- remove JSON-RPC from 0.2.0 snapshot +- Generate diagnosis matrix +- align spec to actual implementation +- Remove RFC 0011-simple-group-chat +- Rfc skill (#131) +- small cleanups extracted from #96 prep work (#124) +- add WELL_KNOWN_CHAINS constants, use in examples (#128) +- Remove RFC 0010-get-root-account +- Notes from 12.05 Working Group Review +- Update 0020-create-transaction.md +- Create 0020-create-transaction.md +- Add Rust trait update checklist item to RFC PR template +- Auto-number RFCs on merge via CI +- complete withChainHeadFollow on Stop instead of erroring +- scope withChainHeadFollow subscriptionId per subscription +- extract withChainHeadFollow, drop `any` from examples, fix GenericError wire +- cargo-doc: serve static.files at site root so rustdoc CSS resolves (#119) +- fall back to ancestorOrigins when referrer is empty (#120) +- sync Cargo.toml version and auto-create GitHub Release (#113) +- render offline UI on GH Pages instead of stuck splash (#118) +- Playground: Monaco editor + rxjs + cargo-doc links + deep links (#116) +- Fix wire ID collision: shift CoinPayment IDs to 136+ +- Rename listen_for to listen_for_payment +- RFC 0019: mark as breaking change +- Align RFC 0019 method names and error type with trait renames +- Rename push_notification methods for clarity +- Rename PushNotificationError to HostPushNotificationError +- RFC 0017: remove CoinPaymentInvoice type and align method names +- Remove version field from RFC pseudocode CoinPaymentCheque +- Fix codegen: collect error wrappers for ResultSubscription methods +- Address review comments: remove version field, error aliases, and Resolvable type +- Drop host_coin_payment_ prefix from CoinPayment trait methods +- move notification methods from System to Notifications trait +- implement RFC 0019 scheduled push notifications +- Remove unused PaymentPurse alias and CoinPaymentInvoice type +- Rename HostPaymentRequestRequest to HostPaymentRequest (#83) +- RFC 0017: add CoinPayment host API +- updated tokens with the ones from new design system + +### Fixed + +- match upstream ThemeName variant order (Custom before Default) +- keep version at 0.3.0 for release +- make PartialPayment top-up error a non-breaking append +- clean up cut-version.sh +- qualify method routes by service +- harden contiguity check and pin multi-version codec indices +- Update Paseo Next V2 Genesis hash +- make examples valid against the generated client +- remove unused HostCreateTransactionWithLegacyAccountRequest +- protocol document +- removed JAM codec mention +- restored indices +- display for RemotePermissionRequest +- fold RFC17 review cleanup +- rename host_push_notification_cancel to push_notification_cancel +- align CoinPayment trait with native async traits + +### Removed + +- roll back the CoinPayment (Coinage) host API +- remove Version::Next — unused until V2 types exist + +## [0.1.0] - 2026-05-15 + +### RFCs + +- **Accepted:** RFC Title +- **Accepted:** Permission Model for Host API +- **Accepted:** Payment Host API +- **Accepted:** RFC-0007: Deterministic Entropy Derivation for Products +- **Accepted:** Statement Store Host API v0.2 +- **Accepted:** RFC-0009: Unauthenticated Product Access +- **Accepted:** RFC-0010: W3S Allowance Management in TrUAPI +- **Accepted:** Host API root account access +- **Accepted:** Simple Group Chat +- **Accepted:** RFC-0015: Get User Primary DotNS Name +- **Accepted:** Scheduled Push Notifications + +### Added + +- reject wire ids that collide with RESERVED_WIRE_IDS + +### Changed + +- @parity/truapi 0.1.0 — drop --ignore-scripts from install (#91) +- @parity/truapi-0.1.0 (#89) +- @parity/truapi-0.1.0 +- Add release template +- Replace release bot with [release: PR title] gate +- Add release workflow to publish @parity/truapi via npm_publish_automation +- ignore generated TS outputs in git (#73) +- Refactor codegen (#68) +- remove public_key from HostGetUserIdResponse +- parse version from type prefix instead of hard-coding V01 +- drop "0." from protocol version label +- rewrite to match actual repo structure and RFC CI requirements +- update generated types after macro doc comment changes +- address review: future-proof docs, auto-generate versioned wrapper doc comments +- drop v02 module: merge all types into v01, remove codegen discriminant hack +- tighten SubscriptionError assertions on malformed-receive and provider-close +- collapse observer error to single SubscriptionError type +- fix fmt and regenerate TS client +- Update rust/crates/truapi/src/api/calls.rs +- Update rust/crates/truapi-codegen/src/typescript.rs +- Bump next from 15.5.15 to 15.5.18 in /playground +- rename chainHeadFollow → chainHeadFollowSubscribe +- fix client example return types and regenerate +- regenerate TS client and examples +- fix legacy sign-payload example and fmt +- add V2 HostSignPayloadWithLegacyAccountRequest +- truapi-codegen: emit HexString import in generated client.ts +- add JsonRpc, Theme, ResourceAllocation traits + host_request_login +- add remote_preimage_submit + statement_store_create_proof_authorized +- add host_sign_*_with_legacy_account (wire 34–37) +- rename remote_chain_head_follow → remote_chain_head_follow_subscribe +- fix fmt +- drop host_chat_create_simple_group entirely +- move host_chat_create_simple_group off colliding wire ID 130 +- emit plain HexString name + drop dead Uint8Array parsers +- update readme +- update +- align with host-product-sdk via HexString codec, drop dead helpers +- Require truapi interface changes in RFC PRs +- Add RFC validation CI workflow +- Rename deploy-playground CI file +- Fix submodule: recursive for workflows +- PR review +- simplify wire-table +- @parity/truapi: drop unused encodeWireMessage/decodeWireMessage from public surface +- rename /page diagnostics route to /diagnostics +- @parity/truapi: add publish metadata and dispose() handle +- tighten codegen and add v02 RemotePermission::PreimageSubmit +- fix ci +- fixes +- update types +- update +- fixes +- Address PR review findings +- add back doc site +- nit +- fixes +- renaming +- renaming +- rename stuff +- Address PR review findings +- updat rust code +- fix +- Fixes in RFC +- Propagate Rust doc comments to generated TS client +- Tighten review nits: deploy concurrency, BigInt regex, format args +- Pick V1 wrapper in codegen so legacy hosts decode every method +- Auto-respond to host_handshake_request in @truapi/client +- Fix handshake_response payload so the legacy decoder accepts it +- Answer the host's handshake_request to end the retry loop +- Pin handshake to V1 so legacy host-api accepts it +- Make playground reachable when no host is responding +- Add dotli submodule and top-level CLAUDE.md +- Surface subscription id; restore chain-head ephemeral-follow logic +- Add RFC 0012 for scheduled push notifications +- Promote truapi crate, add codegen, drop legacy docsite +- Add dev server proxy for legacy URL redirects +- Prepare for repo rename from truapi-explorer to truapi +- Align v0.2 API definitions with triangle-js-sdks implementation +- Migrate RFC-0014 (Get User Primary DotNS Name) as RFC-0015 +- Fix TopicFilter to enum with MatchAll/MatchAny variants +- RFC-0011: Simple Group Chat +- Update RFC index with 0010-allowance entry +- RFC-0010: W3S Allowance Management in TrUAPI +- Migrate feature index and accepted RFCs from triangle-js-sdks +- Migrate PR templates and CONTRIBUTING guide from triangle-js-sdks +- Migrate host-api-protocol design doc from triangle-js-sdks +- Update Contacts API note in v02-changes.md +- Add draggable sidebar resizer with persisted width and double-click reset +- Bump vite to 8.0.8 to patch dev-server path traversal and file-read advisories +- Fix TypeScript narrowing in Fields and Variants map callbacks +- Use CSS grid for Fields and Variants tables to align columns across rows +- Fix long variant/field names overlapping right column on type pages +- Redirect legacy /host-api-explorer URLs to /truapi-explorer +- Promote v0.2 from preview to stable and make it the default version +- Update v02-changes.md with additional document links +- Add README.md +- Add Rust docs and v0.2 change doc +- Add v02 spec +- Change api-spec to v02 +- Correct the vite path name +- Rename more thoroughly +- Rename host api to truAPI and add truapi-spec +- Bump brace-expansion +- Bump picomatch from 4.0.3 to 4.0.4 +- Bump flatted from 3.4.1 to 3.4.2 +- Make mobile friendly +- Clean up types (2) +- Clean up types +- Link types properly (2) +- Link types properly +- Improve readability +- UI improvements +- Replace iframe terminology with sandbox +- Fix GitHub Pages SPA routing +- Remove unused variable in TypesPage +- Add .npmrc to resolve Vite 8 / Tailwind peer dep conflict +- Initial commit: Host API Protocol Explorer + +### Fixed + +- clippy needless_borrow and stale type import + diff --git a/Cargo.lock b/Cargo.lock index bdf4dc49..5506d05e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4948,7 +4948,7 @@ dependencies = [ [[package]] name = "truapi" -version = "0.7.0" +version = "0.8.0" dependencies = [ "async-trait", "derive_more 2.1.1", diff --git a/hosts/dotli b/hosts/dotli index e7bb586f..7921ce41 160000 --- a/hosts/dotli +++ b/hosts/dotli @@ -1 +1 @@ -Subproject commit e7bb586f07f24c8556bcf31ceb996f7ef84f90a6 +Subproject commit 7921ce413a4a1661b36c3f5032d91287a8f160bf diff --git a/js/packages/truapi-host/CHANGELOG.md b/js/packages/truapi-host/CHANGELOG.md index 7afae724..590d46c9 100644 --- a/js/packages/truapi-host/CHANGELOG.md +++ b/js/packages/truapi-host/CHANGELOG.md @@ -1,5 +1,19 @@ # @parity/truapi-host +## 0.5.0 + +### Minor Changes + +- Host callbacks gain `supportedChains()`, returning the host's environment plus + one `(ChainIdentifier, genesisHash)` entry per chain role. The core answers + `chain.getChainInfo` (RFC 0026) from this single callback; web hosts implement + it on the `features` callback group. + +### Patch Changes + +- Updated dependencies + - @parity/truapi@0.8.0 + ## 0.4.0 ### Minor Changes diff --git a/js/packages/truapi-host/package.json b/js/packages/truapi-host/package.json index 7d2792c3..b3185125 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.4.0", + "version": "0.5.0", "description": "WASM-backed TrUAPI host runtime: embeds the Rust core, with web iframe and Web Worker entry points", "license": "MIT", "author": "Parity Technologies ", @@ -49,7 +49,7 @@ "test": "bun test" }, "dependencies": { - "@parity/truapi": "^0.7.0" + "@parity/truapi": "^0.8.0" }, "devDependencies": { "@types/bun": "^1.3.0", diff --git a/js/packages/truapi/CHANGELOG.md b/js/packages/truapi/CHANGELOG.md index 965f7539..f3bc2608 100644 --- a/js/packages/truapi/CHANGELOG.md +++ b/js/packages/truapi/CHANGELOG.md @@ -1,5 +1,14 @@ # @parity/truapi +## 0.8.0 + +### Minor Changes + +- Add `chain.getChainInfo` (RFC 0026): products resolve a `ChainIdentifier` role + (`Relay`, `AssetHub`, `People`, `Bulletin`) against the host's configured + environment and receive the network string plus the chain's genesis hash, so + genesis hashes no longer need to be hard-coded into product bundles. + ## 0.7.0 ### Minor Changes diff --git a/js/packages/truapi/package.json b/js/packages/truapi/package.json index ffd18f27..b911009e 100644 --- a/js/packages/truapi/package.json +++ b/js/packages/truapi/package.json @@ -1,6 +1,6 @@ { "name": "@parity/truapi", - "version": "0.7.0", + "version": "0.8.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.8.0/services.ts b/js/packages/truapi/src/explorer/codegen/versions/0.8.0/services.ts new file mode 100644 index 00000000..9025530a --- /dev/null +++ b/js/packages/truapi/src/explorer/codegen/versions/0.8.0/services.ts @@ -0,0 +1,814 @@ +// 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; the host selects the member key for the ring.", + 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: "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: "Chat", + 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.", + 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: "custom_message_render", + type: "subscription", + signature: + "customMessageRender(request: ProductChatCustomMessageRenderRequest): ObservableLike", + docUrl: "api/chat/trait.Chat.html#method.custom_message_render", + hostInitiated: true, + description: "Streams renderer trees for one stored custom message.", + requestDescription: "ProductChatCustomMessageRenderRequest", + requestType: "product-chat-custom-message-render-request", + responseType: "custom-renderer-node", + }, + ], + }, + { + 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: "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/truapi/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/truapi/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.", + requestDescription: "RemotePermissionRequest", + requestType: "remote-permission-request", + responseType: "remote-permission-response", + }, + ], + }, + { + 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: "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 signed transaction for a product account.", + 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 signed transaction for a non-product (legacy) account.", + 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.", + 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.", + requestDescription: "HostSignPayloadRequest", + requestType: "host-sign-payload-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.", + requestDescription: "HostNavigateToRequest", + requestType: "host-navigate-to-request", + }, + ], + }, + { + 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", + }, + ], + }, +]; diff --git a/js/packages/truapi/src/explorer/codegen/versions/0.8.0/types.ts b/js/packages/truapi/src/explorer/codegen/versions/0.8.0/types.ts new file mode 100644 index 00000000..d8b823b4 --- /dev/null +++ b/js/packages/truapi/src/explorer/codegen/versions/0.8.0/types.ts @@ -0,0 +1,4705 @@ +// 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: "Payload when a user clicks an action button.", + fields: [ + { + name: "message_id", + type: "string", + description: "Message containing the action.", + }, + { + 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: "chat", + definition: + 'export type Arrangement = "Start" | "End" | "Center" | "SpaceBetween" | "SpaceAround" | "SpaceEvenly";', + description: "Layout arrangement (like CSS flexbox `justify-content`).", + 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: "chat", + 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: "border-style", + name: "BorderStyle", + category: "chat", + 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: "chat", + definition: + "export interface BoxProps {\n contentAlignment?: ContentAlignment;\n}", + description: "Properties for a [`CustomRendererNode::Box`] container.", + fields: [ + { + name: "content_alignment", + type: "ContentAlignment | undefined", + description: "Content alignment within the box.", + }, + ], + }, + { + id: "button-props", + name: "ButtonProps", + category: "chat", + definition: + "export interface ButtonProps {\n text: string;\n variant?: ButtonVariant;\n enabled: OptionalBool;\n loading: OptionalBool;\n clickAction?: string;\n}", + description: "Properties for a [`CustomRendererNode::Button`].", + fields: [ + { + name: "text", + type: "string", + description: "Button label text.", + }, + { + name: "variant", + type: "ButtonVariant | undefined", + description: "Button style variant.", + }, + { + name: "enabled", + type: "OptionalBool", + description: + "Whether the button is enabled. Absent leaves the default to the host.", + }, + { + name: "loading", + type: "OptionalBool", + description: + "Whether the button shows a loading state. Absent leaves the default to the host.", + }, + { + name: "click_action", + type: "string | undefined", + description: "Action identifier triggered on click.", + }, + ], + }, + { + id: "button-variant", + name: "ButtonVariant", + category: "chat", + definition: 'export type ButtonVariant = "Primary" | "Secondary" | "Text";', + description: "Button style variants.", + 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 triggered an action 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.", + 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: "chat", + definition: + 'export type ColorToken = "FgPrimary" | "FgSecondary" | "FgTertiary" | "BgSurfaceMain" | "BgSurfaceContainer" | "BgSurfaceNested" | "FgSuccess" | "FgError" | "FgWarning";', + description: "Semantic color tokens for theming.", + variants: [ + { + name: "FgPrimary", + type: '{ tag: "FgPrimary"; value?: undefined }', + description: "Primary foreground (text) color.", + }, + { + name: "FgSecondary", + type: '{ tag: "FgSecondary"; value?: undefined }', + description: "Secondary foreground color.", + }, + { + name: "FgTertiary", + type: '{ tag: "FgTertiary"; value?: undefined }', + description: "Tertiary foreground color.", + }, + { + 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 color for success states.", + }, + { + name: "FgError", + type: '{ tag: "FgError"; value?: undefined }', + description: "Foreground color for error states.", + }, + { + name: "FgWarning", + type: '{ tag: "FgWarning"; value?: undefined }', + description: "Foreground color for warning states.", + }, + ], + }, + { + id: "column-props", + name: "ColumnProps", + category: "chat", + definition: + "export interface ColumnProps {\n horizontalAlignment?: HorizontalAlignment;\n verticalArrangement?: Arrangement;\n}", + description: "Properties for a [`CustomRendererNode::Column`] layout.", + fields: [ + { + name: "horizontal_alignment", + type: "HorizontalAlignment | undefined", + description: "Horizontal alignment of children.", + }, + { + name: "vertical_arrangement", + type: "Arrangement | undefined", + description: "Vertical arrangement of children.", + }, + ], + }, + { + id: "content-alignment", + name: "ContentAlignment", + category: "chat", + definition: + 'export type ContentAlignment = "TopStart" | "TopCenter" | "TopEnd" | "CenterStart" | "Center" | "CenterEnd" | "BottomStart" | "BottomCenter" | "BottomEnd";', + description: "2D content alignment.", + 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: "custom-renderer-node", + name: "CustomRendererNode", + category: "chat", + definition: + 'export type CustomRendererNode =\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; children: 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; children: Array } }\n;', + description: + "A node in the custom renderer UI tree. Component variants contain recursive\n`children` fields.", + variants: [ + { + name: "Nil", + type: '{ tag: "Nil"; value?: undefined }', + description: "Empty node.", + }, + { + name: "String", + type: '{ tag: "String"; value: { text: string } }', + description: "Raw text string.", + }, + { + 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; children: Array } }', + description: "Flexible space.", + }, + { + name: "Text", + type: '{ tag: "Text"; value: { modifiers: Array; props: TextProps; children: Array } }', + description: "Text display.", + }, + { + 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; children: Array } }', + description: "Text input.", + }, + ], + }, + { + 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: "chat", + definition: + "export interface Dimensions {\n top: Size;\n end: Size;\n bottom?: Size;\n start?: Size;\n}", + description: + "CSS-like dimensions: (top, end, bottom, start).\nBottom defaults to top, start defaults to end when `None`.", + fields: [ + { + name: "top", + type: "Size", + description: "Top dimension.", + }, + { + name: "end", + type: "Size", + description: "End dimension.", + }, + { + name: "bottom", + type: "Size | undefined", + description: "Bottom dimension. Defaults to top when absent.", + }, + { + name: "start", + type: "Size | undefined", + description: "Start dimension. Defaults to end when absent.", + }, + ], + }, + { + 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: "chat", + definition: 'export type HorizontalAlignment = "Start" | "Center" | "End";', + description: "Horizontal alignment options.", + 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: "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 selected member key is not a member of 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-create-proof-request", + name: "HostAccountCreateProofRequest", + category: "account", + definition: + "export interface HostAccountCreateProofRequest {\n context: ProductProofContext;\n ringLocation: RingLocation;\n message: HexString;\n}", + description: "Request to create a ring VRF proof.", + fields: [ + { + 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; the host selects the member key.", + }, + { + 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: "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 selected member key is not a member of 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 context: ProductProofContext;\n ringLocation: RingLocation;\n}", + description: + "Request to retrieve the contextual alias for a context and ring.", + fields: [ + { + 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-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: "Assigned 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 signed transaction.", + }, + ], + }, + { + 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 signed transaction.", + }, + ], + }, + { + 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\nThe user's decision is persisted indefinitely after the first prompt and\nsurvives app restarts, whether the decision was grant or deny; the host\ndoes not re-prompt on subsequent requests for the same capability.", + 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 URLs outside the host.", + }, + { + 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-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-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: "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: "host-local-storage-read-request", + name: "HostLocalStorageReadRequest", + category: "local_storage", + definition: + "export interface HostLocalStorageReadRequest {\n key: string;\n}", + description: "Request to read a local storage value.", + fields: [ + { + 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-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-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: "User denied the navigation prompt.", + }, + { + 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-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/truapi/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-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.", + }, + ], + }, + { + 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: "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: "chat", + 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: { height: Size } }\n | { tag: "Width"; value: { width: Size } }\n | { tag: "MinWidth"; value: { width: Size } }\n | { tag: "MinHeight"; value: { height: Size } }\n | { tag: "FillWidth"; value: { enabled: boolean } }\n | { tag: "FillHeight"; value: { enabled: boolean } }\n;', + description: + "Layout and styling modifiers applied to custom renderer components.", + 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 style.", + }, + { + name: "Height", + type: '{ tag: "Height"; value: { height: Size } }', + description: "Fixed height.", + }, + { + name: "Width", + type: '{ tag: "Width"; value: { width: Size } }', + description: "Fixed width.", + }, + { + name: "MinWidth", + type: '{ tag: "MinWidth"; value: { width: Size } }', + description: "Minimum width.", + }, + { + name: "MinHeight", + type: '{ tag: "MinHeight"; value: { height: Size } }', + description: "Minimum height.", + }, + { + name: "FillWidth", + type: '{ tag: "FillWidth"; value: { enabled: boolean } }', + description: "Fill available width.", + }, + { + name: "FillHeight", + type: '{ tag: "FillHeight"; value: { enabled: boolean } }', + description: "Fill available height.", + }, + ], + }, + { + id: "notification-id", + name: "NotificationId", + category: "notifications", + definition: "export type NotificationId = number;", + description: + "Opaque identifier for a push notification, 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: "optional-bool", + name: "OptionalBool", + category: "chat", + definition: "export type OptionalBool = boolean | undefined;", + description: + "An optional boolean with the compact SCALE encoding used by renderer props.", + }, + { + 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: "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-chat-custom-message-render-request", + name: "ProductChatCustomMessageRenderRequest", + category: "chat", + definition: + "export interface ProductChatCustomMessageRenderRequest {\n messageId: string;\n messageType: string;\n payload: HexString;\n}", + description: + "Render work sent by the host when a native custom-message cell appears.", + fields: [ + { + name: "message_id", + type: "string", + description: "Stable identifier used to correlate triggered actions.", + }, + { + name: "message_type", + type: "string", + description: "Product-defined discriminator used to select a renderer.", + }, + { + name: "payload", + type: "HexString", + description: "Stored product-defined message payload.", + }, + ], + }, + { + 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: "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: "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.", + }, + { + name: "WebRtc", + type: '{ tag: "WebRtc"; value?: undefined }', + description: "WebRTC media access.", + }, + { + 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: "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: "row-props", + name: "RowProps", + category: "chat", + definition: + "export interface RowProps {\n verticalAlignment?: VerticalAlignment;\n horizontalArrangement?: Arrangement;\n}", + description: "Properties for a [`CustomRendererNode::Row`] layout.", + fields: [ + { + name: "vertical_alignment", + type: "VerticalAlignment | undefined", + description: "Vertical alignment of children.", + }, + { + name: "horizontal_arrangement", + type: "Arrangement | undefined", + description: "Horizontal arrangement 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: "chat", + definition: + 'export type Shape =\n | { tag: "Rounded"; value: { radius: Size } }\n | { tag: "Circle"; value?: undefined }\n;', + description: "Shape for borders and backgrounds.", + variants: [ + { + name: "Rounded", + type: '{ tag: "Rounded"; value: { radius: Size } }', + description: "Border radius value.", + }, + { + name: "Circle", + type: '{ tag: "Circle"; value?: undefined }', + description: "Circular shape.", + }, + ], + }, + { + 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: "chat", + definition: "export type Size = number | bigint;", + description: + "A size/dimension value (logical pixels) used across the custom renderer.\n\nEncoded as a SCALE `Compact`: the common small values cost a single\nbyte on the wire instead of eight.", + }, + { + 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: "chat", + definition: + "export interface TextFieldProps {\n text: string;\n placeholder?: string;\n label?: string;\n enabled: OptionalBool;\n valueChangeAction?: string;\n}", + description: "Properties for a [`CustomRendererNode::TextField`].", + fields: [ + { + name: "text", + type: "string", + description: "Current text value.", + }, + { + name: "placeholder", + type: "string | undefined", + description: "Placeholder text.", + }, + { + name: "label", + type: "string | undefined", + description: "Field label.", + }, + { + name: "enabled", + type: "OptionalBool", + description: + "Whether the field is enabled. Absent leaves the default to the host.", + }, + { + name: "value_change_action", + type: "string | undefined", + description: "Action identifier triggered when the value changes.", + }, + ], + }, + { + id: "text-props", + name: "TextProps", + category: "chat", + definition: + "export interface TextProps {\n style?: TypographyStyle;\n color?: ColorToken;\n}", + description: "Properties for a [`CustomRendererNode::Text`] display.", + 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: "chat", + definition: + 'export type TypographyStyle = "HeadlineLarge" | "TitleMediumRegular" | "BodyLargeRegular" | "BodyMediumRegular" | "BodySmallRegular";', + description: "Text typography presets.", + 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: "vertical-alignment", + name: "VerticalAlignment", + category: "chat", + definition: 'export type VerticalAlignment = "Top" | "Center" | "Bottom";', + description: "Vertical alignment options.", + 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 83db9772..70ca18fb 100644 --- a/package-lock.json +++ b/package-lock.json @@ -18,7 +18,7 @@ }, "js/packages/truapi": { "name": "@parity/truapi", - "version": "0.7.0", + "version": "0.8.0", "license": "MIT", "dependencies": { "@noble/hashes": "^2.2.0", @@ -32,10 +32,10 @@ }, "js/packages/truapi-host": { "name": "@parity/truapi-host", - "version": "0.4.0", + "version": "0.5.0", "license": "MIT", "dependencies": { - "@parity/truapi": "^0.7.0" + "@parity/truapi": "^0.8.0" }, "devDependencies": { "@types/bun": "^1.3.0", diff --git a/rust/crates/truapi/Cargo.toml b/rust/crates/truapi/Cargo.toml index a68a5b61..d56bc8e5 100644 --- a/rust/crates/truapi/Cargo.toml +++ b/rust/crates/truapi/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "truapi" -version = "0.7.0" +version = "0.8.0" edition.workspace = true license.workspace = true description = "TrUAPI trait and type definitions"