feat(mock): re-port MockPlatform + createMockHost onto current core#294
Draft
decrypto21 wants to merge 1 commit into
Draft
feat(mock): re-port MockPlatform + createMockHost onto current core#294decrypto21 wants to merge 1 commit into
decrypto21 wants to merge 1 commit into
Conversation
Closed
decrypto21
marked this pull request as draft
July 20, 2026 10:15
decrypto21
force-pushed
the
feat/mock-report
branch
from
July 20, 2026 10:34
5ab5488 to
4a1e425
Compare
decrypto21
force-pushed
the
feat/mock-report
branch
from
July 20, 2026 10:52
4a1e425 to
0d90893
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Re-port of the TrUAPI mock host onto current
main. Supersedes the stale #258 branch (feat/mock-platform), which was on a superseded base (worktree-issue-96-rust-core-port) and written against #104's API. Main already landed the core, so this brings over only the mock-specific additions, adapted to main's core API — one clean commit onmain.Refs #257 (in-core mock host:
MockPlatform+createMockHost). Part of the testing ladder tracked in sdk-team#43.What's in it
truapi-platform—MockPlatformbehind themockfeature: in-memory storage, fixed-policy permissions, configurable chain, notifications, confirmations, theme, and lookup-only preimages.PreimageHostis lookup-only (the core owns Bulletin submission), sosubmit_preimage/BulletinAllowanceSignerare dropped and content is seeded viainsert_preimage. Types come fromtruapi::latestper crate convention.truapi-host—createMockHostreturns the nestedRequiredHostCallbacksshape (main's per-capability grouping, not #104'sFlatHostCallbacks);mockRuntimeConfigsets the new required bulletin genesis hash.@parity/truapi-hostjob builds the WASM and runsbun testwithREQUIRE_WASM=1, wired into theci-statusgate.Deliberately not ported
The through-core mock-wallet harness from #258 is left out: main already provides the equivalent
StubPlatform+ SSO statement/frame builders intruapi-server/src/test_support.rs. Converging those two doubles into one canonical mock is tracked as a follow-up (sdk-team#43-D8 / D7).Tests
Rust
truapi-platformmock tests +truapi-hostcreate-mock-hostandwasm-bridge(real WASM core) suites green. Dev-only: themockfeature is excluded from production builds.Closure
Closes the re-port half of #257. The browser E2E harness (#260 / PR #261) rebases on top once this lands. See sdk-team#43 for the full stack and merge order.