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
3 changes: 1 addition & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,7 @@ dev-bootstrap: ## Prepare ignored generated/build artifacts needed by dotli prev
# --ignore-scripts: the workspace `prepare` builds need generated sources
# that only exist after codegen.sh, which also builds the packages.
if [ ! -d node_modules ]; then npm ci --ignore-scripts; fi
if [ ! -f "$(HOST_CALLBACKS_GENERATED)" ] || [ ! -f "$(HOST_WASM_ADAPTER_GENERATED)" ] || [ ! -f "$(HOST_WASM_WORKER_CALLBACKS_GENERATED)" ]; then ./scripts/codegen.sh; fi
cd $(TRUAPI_PKG) && npm run build
./scripts/codegen.sh
cd $(HOST_WASM_PKG) && npm run build
TRUAPI_WASM_PROFILE=dev $(MAKE) wasm
cd $(PLAYGROUND) && yarn install --frozen-lockfile
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ make playground # rebuild the playground against the refreshed snapshot
```

This repopulates the ignored generated TS under `js/packages/truapi/`, including the playground metadata.
`make dev` and `make e2e-dotli` run this generation step unconditionally before starting their local stacks.

## Protocol versions

Expand Down
2 changes: 1 addition & 1 deletion hosts/dotli
Submodule dotli updated 62 files
+0 −4 .env.example
+8 −12 MIGRATION.md
+1 −1 apps/host/src/pwa.ts
+18 −93 apps/host/tests/e2e/helpers/signer-bot.ts
+25 −18 apps/host/tests/e2e/helpers/signing.ts
+42 −34 apps/host/tests/e2e/truapi.spec.ts
+0 −18 apps/protocol/src/main.ts
+150 −130 bun.lock
+21 −11 docs/smoldot.md
+0 −10 packages/config/src/config.ts
+13 −9 packages/config/src/network.ts
+9 −1 packages/config/tests/gateway-chains.test.ts
+0 −18 packages/protocol/src/auth-storage.ts
+57 −138 packages/protocol/src/broker.ts
+0 −12 packages/protocol/src/client.ts
+0 −1 packages/protocol/src/messages.ts
+3 −9 packages/protocol/tests/auth-storage.test.ts
+0 −231 packages/protocol/tests/broker.test.ts
+3 −0 packages/resolver/package.json
+1 −1 packages/resolver/src/chain-specs/paseo.smol.json
+1 −1 packages/resolver/src/chain-specs/previewnet.smol.json
+31 −2 packages/resolver/src/rpc-chain.ts
+0 −15 packages/resolver/tests/chains.test.ts
+8 −14 packages/resolver/tests/rpc-chain.test.ts
+2 −4 packages/shared/src/executables.ts
+12 −30 packages/truapi-debug/DEBUG_PANEL.md
+1 −4 packages/truapi-debug/package.json
+1 −184 packages/truapi-debug/src/dotli-debug-types.ts
+1 −1 packages/truapi-debug/src/event-store.ts
+2 −8 packages/truapi-debug/src/panel.ts
+0 −107 packages/truapi-debug/src/system-explanations.ts
+0 −40 packages/truapi-debug/src/system-summary.ts
+15 −21 packages/truapi-debug/src/timeline-layout.ts
+0 −38 packages/truapi-debug/tests/timeline-layout.test.ts
+2 −3 packages/ui/package.json
+93 −212 packages/ui/src/bridge.ts
+1 −8 packages/ui/src/bulletin-bitswap.ts
+0 −10 packages/ui/src/host-callbacks/AuthState.ts
+8 −53 packages/ui/src/host-callbacks/Chain.ts
+7 −2 packages/ui/src/host-callbacks/OpenUrl.ts
+8 −1 packages/ui/src/host-callbacks/Preimage.ts
+3 −10 packages/ui/src/host-callbacks/PromptPermission.ts
+0 −3 packages/ui/src/host-callbacks/PushNotification.ts
+4 −38 packages/ui/src/host-callbacks/SessionStore.ts
+0 −156 packages/ui/src/host-callbacks/SsoDebug.ts
+47 −2 packages/ui/src/host-callbacks/UserConfirmation.ts
+0 −194 packages/ui/src/host-callbacks/chain-debug.ts
+0 −21 packages/ui/src/host-callbacks/rate-limit.ts
+191 −8 packages/ui/src/legacy-host-bridge.ts
+0 −132 packages/ui/src/styles/signing.css
+0 −42 packages/ui/src/styles/themes.css
+15 −86 packages/ui/src/topbar.ts
+35 −26 packages/ui/tests/bridge.test.ts
+9 −200 packages/ui/tests/chain-callback.test.ts
+322 −0 packages/ui/tests/legacy-host-bridge.test.ts
+22 −0 packages/ui/tests/open-url.test.ts
+35 −1 packages/ui/tests/permissions.test.ts
+89 −14 packages/ui/tests/preimage.test.ts
+2 −2 packages/ui/tests/session-store.test.ts
+43 −68 packages/ui/tests/topbar.test.ts
+173 −3 packages/ui/tests/user-confirmation.test.ts
+1 −1 scripts/unlink-truapi-local.ts
3 changes: 2 additions & 1 deletion js/packages/truapi/scripts/ensure-generated.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ for path in "${codegen_required[@]}"; do
fi
done

if [ "$missing" -eq 1 ] || ! find playground/test/generated/examples -name '*.ts' -print -quit >/dev/null 2>&1; then
example_file="$(find playground/test/generated/examples -type f -name '*.ts' -print -quit 2>/dev/null || true)"
if [ "$missing" -eq 1 ] || [ -z "$example_file" ]; then
if [ "${TRUAPI_REQUIRE_GENERATED:-0}" = "1" ]; then
echo "ensure-generated: generated files are missing and TRUAPI_REQUIRE_GENERATED=1, so codegen will not run." >&2
echo "These files are expected to be restored from the 'codegen-output' CI artifact." >&2
Expand Down
16 changes: 14 additions & 2 deletions rust/crates/truapi/src/api/account.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,17 @@ pub trait Account: Send + Sync {
/// ```ts
/// import { PASEO_NEXT_V2_ASSET_HUB } from "@parity/truapi";
///
/// const PEOPLE_COLLECTION_ID =
/// "0x706f703a706f6c6b61646f742e6e6574776f726b2f70656f706c652020202020";
///
/// const result = await truapi.account.getAccountAlias({
/// context: { productId: "truapi-playground.dot", suffix: "0x00" },
/// ringLocation: {
/// chainId: PASEO_NEXT_V2_ASSET_HUB.genesis,
/// junctions: [{ tag: "PalletInstance", value: 42 }],
/// junctions: [
/// { tag: "PalletInstance", value: 97 },
/// { tag: "CollectionId", value: PEOPLE_COLLECTION_ID },
/// ],
/// },
/// });
/// assert(result.isOk(), "getAccountAlias failed:", result);
Expand All @@ -91,11 +97,17 @@ pub trait Account: Send + Sync {
/// ```ts
/// import { PASEO_NEXT_V2_ASSET_HUB } from "@parity/truapi";
///
/// const PEOPLE_COLLECTION_ID =
/// "0x706f703a706f6c6b61646f742e6e6574776f726b2f70656f706c652020202020";
///
/// const result = await truapi.account.createAccountProof({
/// context: { productId: "truapi-playground.dot", suffix: "0x00" },
/// ringLocation: {
/// chainId: PASEO_NEXT_V2_ASSET_HUB.genesis,
/// junctions: [{ tag: "PalletInstance", value: 42 }],
/// junctions: [
/// { tag: "PalletInstance", value: 97 },
/// { tag: "CollectionId", value: PEOPLE_COLLECTION_ID },
/// ],
/// },
/// message: "0x48656c6c6f",
/// });
Expand Down