Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
## Reporting Issues

If you have found what you think is a bug,
please [file an issue](https://github.com/paritytech/truapi/issues/new/choose).
please [file an issue](https://github.com/paritytech/host-rust-core/issues/new/choose).

## Suggesting New Features

Expand Down
4 changes: 2 additions & 2 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import PackageDescription
// The published release asset remains the default for remote consumers.
let useLocalBinary = ProcessInfo.processInfo.environment["TRUAPI_USE_LOCAL_BINARY"] == "1"

let publishedBinaryURL = "https://github.com/paritytech/truapi/releases/download/%40parity%2Fios-host%400.6.0/truapi_server.xcframework.zip"
let publishedBinaryURL = "https://github.com/paritytech/host-rust-core/releases/download/%40parity%2Fios-host%400.6.0/truapi_server.xcframework.zip"
let publishedBinaryChecksum = "bf879b1dd489594635f5435f71cbe5dad1809603da408c98438ae7ca6f4b74bb"

let binaryTarget: Target = useLocalBinary
Expand All @@ -41,7 +41,7 @@ let useLocalProviderBinary =
// Set by ios/truapi-provider/scripts/publish.sh. No release exists yet, so remote
// resolution fails on the checksum until the first publish.

let providerBinaryURL = "https://github.com/paritytech/truapi/releases/download/%40parity%2Fios-provider%400.0.0-unpublished/truapi_provider.xcframework.zip"
let providerBinaryURL = "https://github.com/paritytech/host-rust-core/releases/download/%40parity%2Fios-provider%400.0.0-unpublished/truapi_provider.xcframework.zip"
let providerBinaryChecksum = "0000000000000000000000000000000000000000000000000000000000000000"

let providerBinaryTarget: Target = useLocalProviderBinary
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
_The protocol that lets product webviews talk to their Polkadot host._

[![License](https://img.shields.io/badge/license-MIT-blue.svg?style=flat-square)](./LICENSE)
[![CI](https://img.shields.io/github/actions/workflow/status/paritytech/truapi/ci.yml?branch=main&style=flat-square&label=ci)](https://github.com/paritytech/truapi/actions/workflows/ci.yml)
[![Docs](https://img.shields.io/badge/docs-rustdoc-blue?style=flat-square)](https://paritytech.github.io/truapi)
[![CI](https://img.shields.io/github/actions/workflow/status/paritytech/host-rust-core/ci.yml?branch=main&style=flat-square&label=ci)](https://github.com/paritytech/host-rust-core/actions/workflows/ci.yml)
[![Docs](https://img.shields.io/badge/docs-rustdoc-blue?style=flat-square)](https://paritytech.github.io/host-rust-core)
[![Playground](https://img.shields.io/badge/playground-live-success?style=flat-square)](https://truapi-playground.paseo.li/)

</div>
Expand All @@ -19,7 +19,7 @@ TrUAPI (Triangle User-Agent Programming Interface) is the API surface that hosts

## Try it

Browse the published Rust API docs at [paritytech.github.io/truapi](https://paritytech.github.io/truapi).
Browse the published Rust API docs at [paritytech.github.io/host-rust-core](https://paritytech.github.io/host-rust-core).

The interactive playground lets you browse every method, edit request payloads, and call or subscribe to them live against a connected host. It also drives an end-to-end **Diagnosis** that produces a per-host pass/fail report ([playground/README.md → Diagnosis](playground/README.md#diagnosis)). The explorer aggregates those reports into a cross-host **Compatibility** matrix ([explorer/README.md → Host compatibility matrix](explorer/README.md#host-compatibility-matrix)).

Expand Down Expand Up @@ -259,7 +259,7 @@ use a different state directory while debugging.
Pushes to `main` build and deploy:

- The playground to the dotNS label [`truapi-playground`](https://truapi-playground.paseo.li/), live as `truapi-playground.paseo`, via [`.github/workflows/deploy-playground.yml`](.github/workflows/deploy-playground.yml).
- The Rust API docs to [https://paritytech.github.io/truapi](https://paritytech.github.io/truapi) via [`.github/workflows/deploy-docs.yml`](.github/workflows/deploy-docs.yml).
- The Rust API docs to [https://paritytech.github.io/host-rust-core](https://paritytech.github.io/host-rust-core) via [`.github/workflows/deploy-docs.yml`](.github/workflows/deploy-docs.yml).

## Release

Expand Down
6 changes: 3 additions & 3 deletions android/truapi-host/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ dependencies {
}
```

JitPack fetches the tag `0.1.0` from `paritytech/truapi`, runs `make android-publish-local` against it (driven by `jitpack.yml` at the repo root, including UniFFI binding generation), and serves the resulting AAR + POM + sources jar. First fetch takes ~1 minute while JitPack builds; subsequent consumers hit the cache.
JitPack fetches the tag `0.1.0` from `paritytech/host-rust-core`, runs `make android-publish-local` against it (driven by `jitpack.yml` at the repo root, including UniFFI binding generation), and serves the resulting AAR + POM + sources jar. First fetch takes ~1 minute while JitPack builds; subsequent consumers hit the cache.

The artifact bundles the Kotlin host adapter (`io.parity.truapi.*`) and the generated UniFFI bindings (`uniffi.truapi_server.*`). It does **not** bundle the native `libtruapi_server.so` cdylib, integrators build that per Android ABI and drop it into their app's `src/main/jniLibs/<abi>/` (see "Linking the cdylib" below).

Expand Down Expand Up @@ -290,7 +290,7 @@ src/main/jniLibs/x86_64/libtruapi_server.so

Cross-build the cdylib for each Android ABI from the truapi monorepo. Two options, pick whichever fits the host app's existing toolchain:

**Option A: `mozilla-rust-android-gradle` plugin.** Recommended if the host app already uses it (polkadot-app-android-v2 does, for `bandersnatch-crypto`). Vendor `paritytech/truapi` as a git submodule, add a small Gradle module that points the plugin at `rust/crates/truapi-server`:
**Option A: `mozilla-rust-android-gradle` plugin.** Recommended if the host app already uses it (polkadot-app-android-v2 does, for `bandersnatch-crypto`). Vendor `paritytech/host-rust-core` as a git submodule, add a small Gradle module that points the plugin at `rust/crates/truapi-server`:

```kotlin
// app/build.gradle.kts (or a dedicated :truapi-cdylib module)
Expand Down Expand Up @@ -327,7 +327,7 @@ Pre-built per-ABI `.so` files bundled inside the AAR are tracked as a follow-up

## Maintainers: cutting a release

JitPack builds on demand from any git tag in `paritytech/truapi`, so a release is just:
JitPack builds on demand from any git tag in `paritytech/host-rust-core`, so a release is just:

1. Bump `publicationVersion` in `android/truapi-host/build.gradle.kts`.
2. Commit. Open a PR. Merge.
Expand Down
10 changes: 5 additions & 5 deletions android/truapi-host/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -91,17 +91,17 @@ publishing {
"`libtruapi_server` cdylib and route product traffic " +
"through the localhost WebSocket bridge."
)
url.set("https://github.com/paritytech/truapi")
url.set("https://github.com/paritytech/host-rust-core")
licenses {
license {
name.set("MIT")
url.set("https://github.com/paritytech/truapi/blob/main/LICENSE")
url.set("https://github.com/paritytech/host-rust-core/blob/main/LICENSE")
}
}
scm {
connection.set("scm:git:https://github.com/paritytech/truapi.git")
developerConnection.set("scm:git:ssh://git@github.com/paritytech/truapi.git")
url.set("https://github.com/paritytech/truapi")
connection.set("scm:git:https://github.com/paritytech/host-rust-core.git")
developerConnection.set("scm:git:ssh://git@github.com/paritytech/host-rust-core.git")
url.set("https://github.com/paritytech/host-rust-core")
}
developers {
developer {
Expand Down
12 changes: 6 additions & 6 deletions android/truapi-provider/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -113,21 +113,21 @@ publishing {
"catalog, addressed by genesis hash. Bundles " +
"libtruapi_provider.so, so no Rust toolchain is required."
)
url.set("https://github.com/paritytech/truapi")
url.set("https://github.com/paritytech/host-rust-core")
licenses {
license {
name.set("MIT")
url.set("https://github.com/paritytech/truapi/blob/main/LICENSE")
url.set("https://github.com/paritytech/host-rust-core/blob/main/LICENSE")
}
license {
name.set("Apache-2.0")
url.set("https://github.com/paritytech/truapi/blob/main/LICENSE-APACHE")
url.set("https://github.com/paritytech/host-rust-core/blob/main/LICENSE-APACHE")
}
}
scm {
connection.set("scm:git:https://github.com/paritytech/truapi.git")
developerConnection.set("scm:git:ssh://git@github.com/paritytech/truapi.git")
url.set("https://github.com/paritytech/truapi")
connection.set("scm:git:https://github.com/paritytech/host-rust-core.git")
developerConnection.set("scm:git:ssh://git@github.com/paritytech/host-rust-core.git")
url.set("https://github.com/paritytech/host-rust-core")
}
developers {
developer {
Expand Down
2 changes: 1 addition & 1 deletion docs/RELEASE_PROCESS.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ and the lockfile. A host-runtime-only release can bump
Commit the resulting diff and open a PR using the **release** template:

```
https://github.com/paritytech/truapi/compare/main...<your-branch>?template=release.md
https://github.com/paritytech/host-rust-core/compare/main...<your-branch>?template=release.md
```

The PR title must start with `release:`. Convention:
Expand Down
8 changes: 4 additions & 4 deletions docs/rfcs/0024-personhood-as-product.md
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ Here the model is **user-approval driven**: an unapproved foreign access produce

For these two the allowlist is not an optimization but the whole gate, per the rule above: a prompt is not a substitute and MUST NOT be offered, because consenting to an opaque message is not meaningful consent. **The interim fallback of the previous paragraph does not apply here** — the consequence is that foreign proofs and foreign signatures are simply **unavailable until the manifest RFC lands**, since there is nowhere yet to express the allowlist. Own-key use is unaffected and needs nothing.

The allowlist belongs to the product manifest, specified separately ([RFC: Product Manifest Format](https://github.com/paritytech/truapi/pull/206)), with two requirements from here: it must be **structurally extensible**, so a richer scheme (per-method grants, attestation thresholds) can replace a flat product-id list without a wire break; and it should be expressible **per method or category**, so "read my key handles" and "produce a proof with my key" need not be one grant.
The allowlist belongs to the product manifest, specified separately ([RFC: Product Manifest Format](https://github.com/paritytech/host-rust-core/pull/206)), with two requirements from here: it must be **structurally extensible**, so a richer scheme (per-method grants, attestation thresholds) can replace a flat product-id list without a wire break; and it should be expressible **per method or category**, so "read my key handles" and "produce a proof with my key" need not be one grant.

### Accounts Protocol

Expand Down Expand Up @@ -379,11 +379,11 @@ AutoSigning {
## Prior Art and References

- [RFC-0004 — Redesign `account_create_account_proof`](0004-ringlocation-redesign.md) — `RingLocation`, `ProductProofContext`, the context derivation, and the member-key selection contract this RFC deletes. Its "Out of scope: explicit member-key management … left to a future RFC" is this RFC.
- **RFC-0022 — Account key derivations** ([PR #296](https://github.com/paritytech/truapi/pull/296)) — the ring-VRF tree, `Either<u32, [u8; 32]>` indices, the reserved `peopl.dot` identity, and the `AutoSigning` payload this RFC extends. Its deferral of well-known alias accounts is resolved here.
- **RFC-0023 — sr25519 VRF signing for product accounts** ([PR #301](https://github.com/paritytech/truapi/pull/301)) — the complementary non-member path, where this RFC's ring VRF path serves members.
- **RFC-0022 — Account key derivations** ([PR #296](https://github.com/paritytech/host-rust-core/pull/296)) — the ring-VRF tree, `Either<u32, [u8; 32]>` indices, the reserved `peopl.dot` identity, and the `AutoSigning` payload this RFC extends. Its deferral of well-known alias accounts is resolved here.
- **RFC-0023 — sr25519 VRF signing for product accounts** ([PR #301](https://github.com/paritytech/host-rust-core/pull/301)) — the complementary non-member path, where this RFC's ring VRF path serves members.
- [RFC-0020 — `signing_create_transaction` and its AP mirror](0020-create-transaction.md) — the pattern of specifying a TrUAPI call together with its AP companion, followed here.
- [RFC-0010 — W3S Allowance Management](0010-allowance.md) — AutoSigning and the PGAS / Bulletin / SSS flows that consume the person key.
- [RFC-0002 — Permission Model](0002-permission-model.md) — the prompt-once lifecycle every cross-product grant reuses · [RFC-0009](0009-unauthenticated-product-access.md) — `NotConnected` semantics · [RFC: Product Manifest Format](https://github.com/paritytech/truapi/pull/206) — where the allowlist is specified.
- [RFC-0002 — Permission Model](0002-permission-model.md) — the prompt-once lifecycle every cross-product grant reuses · [RFC-0009](0009-unauthenticated-product-access.md) — `NotConnected` semantics · [RFC: Product Manifest Format](https://github.com/paritytech/host-rust-core/pull/206) — where the allowlist is specified.
- [_SSO background availability — common model_](https://hackmd.io/rBEBjBzLQdOHvzwJkfufIQ) — the layered availability ladder the `onLoad` and AutoSigning sections lean on.
- `rust/crates/truapi-server/src/runtime/signing_host/ring_vrf.rs` — the compiled-in selection this RFC removes.
- [Polkadot People Registry / Ring VRF](https://forum.polkadot.network/t/the-people-registry/12749) · [individuality#878](https://github.com/paritytech/individuality/pull/878) — alias-account assignment for derived product addresses.
Expand Down
2 changes: 1 addition & 1 deletion docs/rfcs/0026-supported-chains.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Every chain-scoped TrUAPI call is keyed by `genesisHash`, and today products obt

**Environment moves.** Pointing a product at a different environment (a new testnet iteration, a devnet) means editing constants and shipping a new build, even though the host-side change is a config edit.

The fix is to make the host's chain set discoverable over the wire. Hosts already hold this data in enumerable form: dotli's network config has named slots (`relay`, `assethub`, `bulletin`, `people`) per environment, each with a genesis hash and RPC endpoints. This RFC exposes that mapping to products. Tracking issue: [paritytech/truapi#352](https://github.com/paritytech/truapi/issues/352).
The fix is to make the host's chain set discoverable over the wire. Hosts already hold this data in enumerable form: dotli's network config has named slots (`relay`, `assethub`, `bulletin`, `people`) per environment, each with a genesis hash and RPC endpoints. This RFC exposes that mapping to products. Tracking issue: [paritytech/host-rust-core#352](https://github.com/paritytech/host-rust-core/issues/352).

## Detailed Design

Expand Down
4 changes: 2 additions & 2 deletions docs/rfcs/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ created: 2026-03-13
| ------ | -------------------------------------------------------------------------------------------------------- | -------- | ----------------- | --------------------------------------------------------------- |
| 0001 | [RFC Title](0001-template.md) | accepted | @ownerhandle | — |
| 0002 | [Permission Model for Host API](0002-permission-model.md) | accepted | @johnthecat | [#66](https://github.com/paritytech/triangle-js-sdks/pull/66) |
| 0004 | [Redesign `host_account_create_proof`](0004-ringlocation-redesign.md) | draft | Valentin Sergeev | [#18](https://github.com/paritytech/truapi/pull/18) |
| 0004 | [Redesign `host_account_create_proof`](0004-ringlocation-redesign.md) | draft | Valentin Sergeev | [#18](https://github.com/paritytech/host-rust-core/pull/18) |
| 0006 | [Payment Host API](0006-payments.md) | accepted | Valentin Sergeev | [#94](https://github.com/paritytech/triangle-js-sdks/pull/94) |
| 0007 | [Deterministic Entropy Derivation for Products](0007-derive-entropy.md) | accepted | Valentin Sergeev | [#95](https://github.com/paritytech/triangle-js-sdks/pull/95) |
| 0008 | [Statement Store Host API v0.2](0008-statement-store.md) | draft | @johnthecat | [#118](https://github.com/paritytech/triangle-js-sdks/pull/118) |
Expand All @@ -25,4 +25,4 @@ created: 2026-03-13
| 0021 | [Add Coins variant to PaymentTopUpSource](0021-payment-topup-coins.md) | accepted | @filippovecchiato | — |
| 0022 | [Account key derivations](0022-account-derivations.md) | draft | Valentin Sergeev | — |
| 0023 | [sr25519 VRF signing for product accounts](0023-account-sign-vrf.md) | draft | Valentin Sergeev | — |
| 0026 | [Host chain discovery and name resolution](0026-supported-chains.md) | draft | Valentin Fernandez | [#354](https://github.com/paritytech/truapi/pull/354) |
| 0026 | [Host chain discovery and name resolution](0026-supported-chains.md) | draft | Valentin Fernandez | [#354](https://github.com/paritytech/host-rust-core/pull/354) |
2 changes: 1 addition & 1 deletion ios/truapi-host/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ The embedding app implements `HostBridge` (defined in `TrUAPIHost.swift`): navig
Add the package as an SPM dependency and link the `TrUAPIHost` product into the app target:

```swift
.package(url: "https://github.com/paritytech/truapi.git", branch: "main")
.package(url: "https://github.com/paritytech/host-rust-core.git", branch: "main")
```

```swift
Expand Down
2 changes: 1 addition & 1 deletion ios/truapi-host/Sources/TrUAPIHost/truapi.swift
Original file line number Diff line number Diff line change
Expand Up @@ -1960,7 +1960,7 @@ public func FfiConverterTypeHostChatActionSubscribeItem_lower(_ value: HostChatA
* wall-clock instant (Unix milliseconds UTC). `None` fires immediately,
* preserving prior behaviour. See [RFC 0019].
*
* [RFC 0019]: https://github.com/paritytech/truapi/blob/main/docs/rfcs/0019-scheduled-notifications.md
* [RFC 0019]: https://github.com/paritytech/host-rust-core/blob/main/docs/rfcs/0019-scheduled-notifications.md
*/
public struct HostPushNotificationRequest: Equatable, Hashable {
/**
Expand Down
Loading