Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
29a3800
Person's usernames - read from AH dotNS instead of PC
Zebedeusz Aug 6, 2026
8ef6af3
docs(host-cli): point the DotnsPopController override at the live pas…
filip-parity Aug 17, 2026
8a8bdf4
fix(server,cli): make dotNS username reads and register-name work aga…
filip-parity Aug 17, 2026
2d2eb63
fix(host-cli): give previewnet its own Bulletin and document both pre…
filip-parity Aug 17, 2026
ddb2d44
test(host-cli): live checks for the RegisterFullName shape and dotNS …
filip-parity Aug 17, 2026
3351fcc
fix(server,cli): match the gateway pallet's full-person label rule
filip-parity Aug 17, 2026
9572944
docs(host-cli): previewnet runs the same gateway runtime as paseo-nex…
filip-parity Aug 17, 2026
5827fa7
fix(host-cli): explain a backend that rejects the dotNS reservation
filip-parity Aug 17, 2026
1ff5ad3
Merge branch 'main' into filip/349-rebase
filip-parity Aug 17, 2026
dd9b00e
fix(host-cli): refuse reservations and registrations for names dotNS …
filip-parity Aug 17, 2026
cac2198
fix(server): read the network TLD with a legacy fallback for older do…
filip-parity Aug 17, 2026
774394d
docs(android): wrap the RuntimeConfig doc comment
filip-parity Aug 17, 2026
3e0bfac
Merge branch 'main' into filip/349-rebase
filip-parity Aug 18, 2026
eecaa50
refactor(server,cli): drop dotNS fallbacks no network exercises; make…
filip-parity Aug 18, 2026
de9bc43
fix(server,cli): keep dotNS answers apart from failures; pre-check wh…
filip-parity Aug 18, 2026
c8b1f2b
Merge branch 'main' into filip/349-rebase
filip-parity Aug 18, 2026
2873ff9
fix(server,cli): budget the in-core lookup, warn on truncated stores,…
filip-parity Aug 18, 2026
b933975
Merge branch 'main' into filip/349-rebase
filip-parity Aug 19, 2026
fcb3349
fix(server,cli): drop lapsed pending claims; reserved names follow th…
filip-parity Aug 19, 2026
7a80823
Merge branch 'main' into filip/349-rebase
filip-parity Aug 19, 2026
d120457
Merge branch 'main' into filip/349-rebase
filip-parity Aug 19, 2026
b987b9b
fix(server): pass the Asset Hub genesis in the mobile-host test configs
filip-parity Aug 19, 2026
4e499cd
Merge branch 'main' into filip/349-rebase
filip-parity Aug 19, 2026
b0f0c35
Merge branch 'main' into filip/349-rebase
filip-parity Aug 20, 2026
097ec3b
fix(server,cli,platform): address the #426 review by TarikGul
filip-parity Aug 20, 2026
1ee2927
chore: bump hosts/dotli to the head of dotli-community#180
filip-parity Aug 20, 2026
a9f7562
Merge branch 'main' into filip/349-rebase
filip-parity Aug 21, 2026
6b02377
fix(server): screen usernames centrally and fail closed on availability
filip-parity Aug 21, 2026
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
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 6 additions & 6 deletions ios/truapi-host/Sources/TrUAPIHost/truapi_platform.swift
Original file line number Diff line number Diff line change
Expand Up @@ -1118,7 +1118,7 @@ public struct SessionUiInfo: Equatable, Hashable {
*/
public var publicKey: Bytes32
/**
* Wallet identity account id used for People-chain username lookup.
* Wallet identity account id used for the dotNS username lookup on Asset Hub.
*/
public var identityAccountId: Bytes32?
/**
Expand All @@ -1139,11 +1139,11 @@ public struct SessionUiInfo: Equatable, Hashable {
*/
public var peerStatementAccountId: Bytes32?
/**
* Short username from the People-chain identity record.
* Short username from the dotNS identity record on Asset Hub.
*/
public var liteUsername: String?
/**
* Fully qualified username from the People-chain identity record.
* Fully qualified username from the dotNS identity record on Asset Hub.
*/
public var fullUsername: String?

Expand All @@ -1154,7 +1154,7 @@ public struct SessionUiInfo: Equatable, Hashable {
* 32-byte sr25519 root public key of the active session.
*/publicKey: Bytes32,
/**
* Wallet identity account id used for People-chain username lookup.
* Wallet identity account id used for the dotNS username lookup on Asset Hub.
*/identityAccountId: Bytes32?,
/**
* X25519 public key addressing this identity in chat. Public counterpart
Expand All @@ -1171,10 +1171,10 @@ public struct SessionUiInfo: Equatable, Hashable {
* device discriminator; use [`Self::device_enc_public_key`] for that.
*/peerStatementAccountId: Bytes32?,
/**
* Short username from the People-chain identity record.
* Short username from the dotNS identity record on Asset Hub.
*/liteUsername: String?,
/**
* Fully qualified username from the People-chain identity record.
* Fully qualified username from the dotNS identity record on Asset Hub.
*/fullUsername: String?) {
self.publicKey = publicKey
self.identityAccountId = identityAccountId
Expand Down
7 changes: 6 additions & 1 deletion js/packages/truapi-host/src/runtime.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ export interface ProductRuntimeConfig {
/** Platform or operating-system version. */
version?: string;
};
/** People-chain configuration used for identity lookup. */
/** People-chain configuration used for statement-store SSO. */
people: {
/** People-chain genesis hash. */
genesisHash: string | Uint8Array;
Expand All @@ -91,6 +91,11 @@ export interface ProductRuntimeConfig {
/** Bulletin-chain genesis hash. */
genesisHash: string | Uint8Array;
};
/** Asset Hub configuration used to resolve session usernames from dotNS. */
assetHub: {
/** Asset Hub genesis hash. */
genesisHash: string | Uint8Array;
};
/** Wallet pairing configuration. */
pairing: {
/** URI scheme used for wallet pairing deeplinks. */
Expand Down
4 changes: 4 additions & 0 deletions js/packages/truapi-host/src/web/worker-provider.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,10 @@ function runtimeConfig(
genesisHash:
"0xbbcccc1cbe333151b8ed63b17e9e0dec61ee53b57296f1fbe2d161ae3e6fb4dc",
},
assetHub: {
genesisHash:
"0xcccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc",
},
pairing: {
deeplinkScheme: "polkadotapp",
},
Expand Down
4 changes: 2 additions & 2 deletions js/packages/truapi-host/src/worker-runtime.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ interface WorkerChainConnection {
* Worker-side half of the host chain-connect bridge.
*
* The Rust core runs in this worker but owns no socket. When it needs chain
* access (chainHead v1 for People-chain identity / statement-store SSO) it
* access (chainHead v1 for dotNS identity on Asset Hub / statement-store SSO) it
* calls this; the actual transport lives on the host main thread and is reached
* over postMessage. The data crossing here is JSON-RPC strings, not SCALE: only
* the product<->core wire is SCALE.
Expand All @@ -117,7 +117,7 @@ interface WorkerChainConnection {
* +-------------------+ SCALE +--------------------------+ +--------------------------------+
* | Product (iframe) |<------->| truapi-server WASM core | | host.connect() (ChainProvider) |
* | speaks TrUAPI | frames | chainHead v1, SSO, | | host-owned JSON-RPC transport |
* | never sees chains | | People-chain identity | | remote RPC, native client, ... |
* | never sees chains | | dotNS identity (AH) | | remote RPC, native client, ... |
* +-------------------+ +--------------------------+ +--------------------------------+
* | ^ JSON-RPC strings (not SCALE) ^ |
* chainConnect() | | onResponse(json) connect | | responses()
Expand Down
13 changes: 8 additions & 5 deletions playground/src/lib/example-helpers.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Observable } from "rxjs";
import { err, ok, type Result } from "neverthrow";
import { PASEO_NEXT_V2_INDIVIDUALITY } from "@parity/truapi";
import { PASEO_NEXT_V2_ASSET_HUB } from "@parity/truapi";
import {
AccountId,
Blake2128Concat,
Expand Down Expand Up @@ -51,7 +51,10 @@ export type BuildCreateTransactionPayload = (opts: {
callData: HexString;
}) => Promise<Result<ProductAccountTxPayload, Error>>;

const usernameOwnerOfStorage = Storage("Resources")("UsernameOwnerOf", [
// Lite usernames are keyed by their dotted label ("alice.01") on the Asset
// Hub gateway pallet. Full-person ownership lives contract-side as H160 only.
// Name→account resolution therefore covers lite usernames.
const liteLabelOwnerStorage = Storage("DotnsGateway")("LiteLabelOwner", [
Bytes(),
Blake2128Concat,
]);
Expand Down Expand Up @@ -113,7 +116,7 @@ export function createAccountIdForDotNsUsername(
return err(new Error("DotNS username is empty"));
}

const key = usernameOwnerOfStorage.enc(
const key = liteLabelOwnerStorage.enc(
new TextEncoder().encode(dotNsUsername),
) as HexString;

Expand All @@ -137,7 +140,7 @@ export function createAccountIdForDotNsUsername(
switch (item.tag) {
case "Initialized": {
const result = await truapi.chain.getHeadStorage({
genesisHash: PASEO_NEXT_V2_INDIVIDUALITY.genesis,
genesisHash: PASEO_NEXT_V2_ASSET_HUB.genesis,
followSubscriptionId: sub.subscriptionId,
hash: item.value.finalizedBlockHashes[0],
items: [{ key, queryType: "Value" }],
Expand Down Expand Up @@ -188,7 +191,7 @@ export function createAccountIdForDotNsUsername(
const sub = truapi.chain
.followHeadSubscribe({
request: {
genesisHash: PASEO_NEXT_V2_INDIVIDUALITY.genesis,
genesisHash: PASEO_NEXT_V2_ASSET_HUB.genesis,
withRuntime: false,
},
})
Expand Down
6 changes: 3 additions & 3 deletions rust/crates/truapi-codegen/tests/golden/host-callbacks.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions rust/crates/truapi-host-cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ truapi-server = { path = "../truapi-server" }
anyhow = "1"
arboard = { version = "3.6.1", default-features = false }
async-trait = "0.1"
base64 = "0.22"
bip39 = { version = "2", features = ["rand"] }
clap = { version = "4", features = ["derive", "env"] }
crossterm = { version = "0.29", features = ["event-stream"] }
Expand Down
34 changes: 16 additions & 18 deletions rust/crates/truapi-host-cli/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ One binary, `truapi-host`:
| --- | --- |
| `pairing-host` | Seedless host: serves product frames, emits pairing deeplinks, and can run product scripts. |
| `signing-host` | Wallet-local host: owns signer identity, can run product scripts, accepts pairing deeplinks, registers statement allowance on-chain, signs. |
| `identity-check` | Probe the root and canonical `uid.dot` identity account for a registered username. |
| `identity-check` | Probe the root and canonical `uid.dot` identity account for a registered username (read from the dotNS contracts on Asset Hub). |
| `register-name` | Register a full-person username via `DotnsGateway.register_name` on Asset Hub, linked to a lite username or standalone with a chat key. |
| `alloc-check` | Diagnose (or `--submit`) on-chain statement-store allowance: ring membership, chosen slot, and the `set_statement_store_account` extrinsic. On a full period it prints each occupied slot's age and which one would be replaced. |
| `pgas-check` | Diagnose (or `--submit`) an Asset Hub PGAS allowance claim: ring membership on People, whether Asset Hub has imported that ring revision, the day's first unclaimed slot, and the `Pgas.claim_pgas` extrinsic. |

Expand Down Expand Up @@ -174,7 +175,9 @@ New auto-managed accounts use the session name as their Lite username prefix;
characters other than lowercase letters are omitted. For example, session
`pgtest` creates usernames beginning with `pgtest`. An explicit
`--lite-username-prefix` takes precedence, and `default` retains the historical
`headless` prefix.
`headless` prefix. `--reserved-username <label>` additionally reserves a
full-person base name on dotNS for a newly created account, to be claimed later
with `register-name`; the CLI refuses labels the registrar has already minted.
The selected username and last script reference are cached in `session.json`
inside the displayed session path. Scratch scripts use a portable filename;
explicit scripts use an absolute path. On restart, an
Expand Down Expand Up @@ -458,20 +461,15 @@ The network preset owns the identity backend URL, the People, Bulletin and Asset
Hub RPCs, and their genesis hashes; there is
no public `--statement-store` flag. Pick `previewnet` when a product's runtime
descriptors target previewnet, so its statements, its host chain routes and its
own chain reads all land on one network. Sessions are per preset, so each network
gets its own signer identity on the same machine.

One limit on `previewnet` today: its identity backend requires a bearer token for
write requests, so auto-provisioning a fresh lite username fails with

```
username registration failed (401 Unauthorized): Missing Authorization Header
```

Reads against it work, and everything that does not go through the backend works
normally, so use `--mnemonic` (or `HOST_CLI_SIGNER_MNEMONIC`) with an account that
already carries a previewnet username. `paseo-next-v2` still provisions on its
own, unauthenticated. Both also accept `--frame-listen <address>`
own chain reads all land on one network — it is also the only preset whose
identity backend currently onboards new auto accounts through the dotNS gateway
(the CLI mints the backend's bearer token itself; SPEC.md §12.3). Sessions are
per preset, so each network gets its own signer identity on the same machine.
`HOST_CLI_IDENTITY_BACKEND_BASE` swaps only
the identity backend (for a local one); `HOST_CLI_IDENTITY_BACKEND_TOKEN`
supplies its bearer token instead of the CLI minting one; and
`HOST_CLI_DOTNS_POP_CONTROLLER` overrides on-chain `DotnsPopController`
discovery (see SPEC.md §21). Both also accept `--frame-listen <address>`
to opt into a TCP product-frame WebSocket; without it, the CLI creates and
cleans up a unique temporary Unix socket.

Expand Down Expand Up @@ -525,8 +523,8 @@ one-shot modes.
- **Ring-VRF product-account aliases and proofs** are implemented by the
signing host via the `verifiable` crate (`get_account_alias` and
`create_account_proof`).
- **`get_user_id`** resolves the signing account's username from People-chain
`Resources.Consumers`. Auto-managed signing accounts register fresh lite
- **`get_user_id`** resolves the signing account's username from the dotNS
contracts on Asset Hub. Auto-managed signing accounts register fresh lite
usernames via the identity backend (`src/attestation.rs`); first registration
is backend-async and can take minutes (ring onboarding). `truapi-host
identity-check --mnemonic <m>` probes which derivation carries a username.
Expand Down
Loading