Skip to content

feat(truapi): funding sessions, host overlay, native bridge and test host - #1315

Draft
filvecchiato wants to merge 3 commits into
mainfrom
funding/sessions
Draft

filvecchiato wants to merge 3 commits into
mainfrom
funding/sessions

Conversation

@filvecchiato

Copy link
Copy Markdown
Collaborator

Closes #1137. Part of #1142 and #1140.

  • Funding trait (wire id 22): request(direction, amount?) opens a session and asks the host to show its overlay; statusSubscribe follows it. Only the product that opened a session can watch it.
  • The core keeps the sessions, stores them, expires them after 24 hours, and keeps a bounded history.
  • FundingPlatform is the host's overlay. The Balance card opens sessions with open_funding.
  • Native bridge: set_funding_callbacks, open_funding, funding_session, funding_sessions, cancel_funding and acknowledge_funding_session. Amounts cross the FFI as decimal strings.
  • Ended sessions are handed to the host until it acknowledges them.
  • Test host: make e2e-funding-cli runs the product requests against a scripted CLI funding host (5 cases).

No payment code. The provider layer stacks on this and on #1314.

# Conflicts:
#	rust/crates/truapi-codegen/tests/golden/dispatcher.rs
#	rust/crates/truapi-codegen/tests/golden/host-callbacks.ts
#	rust/crates/truapi-codegen/tests/golden/wire_table.rs
#	rust/crates/truapi-host-cli/README.md
#	rust/crates/truapi-host-cli/src/main.rs
#	rust/crates/truapi/src/api.rs
#	rust/crates/truapi/src/host_core.rs
#	rust/crates/truapi/src/native.rs
#	rust/crates/truapi/src/native/platform.rs
#	rust/crates/truapi/src/native/runtime.rs
#	rust/crates/truapi/src/runtime/tests.rs
#	rust/crates/truapi/src/v01.rs
#	rust/crates/truapi/src/versioned.rs
@github-actions github-actions Bot added documentation Improvements or additions to documentation javascript Pull requests that update javascript code rust Pull requests that update rust code labels Oct 7, 2026
@github-actions

github-actions Bot commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

Bundle size report

Compared with main at b89e96e.

Raw Gzip Brotli
truapi-host 7.84 MiB (+43.9 KiB, +0.6%) 5.65 MiB (+14.6 KiB, +0.3%) 5.38 MiB (+11.1 KiB, +0.2%)
truapi-provider 4.03 MiB 1.27 MiB 959.8 KiB
truapi 5.75 MiB (+23.9 KiB, +0.4%) 810.4 KiB (+3.8 KiB, +0.5%) 664.2 KiB (+2.9 KiB, +0.4%)
Total 17.62 MiB (+67.8 KiB, +0.4%) 7.71 MiB (+18.4 KiB, +0.2%) 6.96 MiB (+14.0 KiB, +0.2%)

WebAssembly modules

Raw Gzip Brotli
truapi-host/wasm/web/truapi_server_bg.wasm 2.74 MiB (+43.5 KiB, +1.6%) 979.1 KiB (+14.5 KiB, +1.5%) 739.2 KiB (+11.0 KiB, +1.5%)
truapi-host/wasm/web/truapi_verifiable_bg.wasm 4.89 MiB 4.64 MiB 4.61 MiB
truapi-provider/truapi_provider_bg.wasm 3.99 MiB 1.26 MiB 952.1 KiB
Changed files (10)
Raw Gzip Brotli
truapi-host/wasm/web/truapi_server_bg.wasm 2.74 MiB (+43.5 KiB, +1.6%) 979.1 KiB (+14.5 KiB, +1.5%) 739.2 KiB (+11.0 KiB, +1.5%)
truapi/explorer/codegen/types.js 215.1 KiB (+9.5 KiB, +4.6%) 29.5 KiB (+1.4 KiB, +5.1%) 23.7 KiB (+1.1 KiB, +4.9%)
truapi/playground/codegen/truapi-dts.js 284.9 KiB (+8.1 KiB, +2.9%) 49.1 KiB (+1.5 KiB, +3.2%) 39.6 KiB (+1.2 KiB, +3.1%)
truapi/generated/types.js 62.8 KiB (+2.0 KiB, +3.3%) 7.6 KiB (+323 B, +4.3%) 6.5 KiB (+213 B, +3.3%)
truapi/playground/codegen/services.js 98.3 KiB (+1.9 KiB, +1.9%) 14.9 KiB (+259 B, +1.7%) 12.5 KiB (+195 B, +1.6%)
truapi/generated/client.js 69.9 KiB (+1.6 KiB, +2.4%) 10.4 KiB (+252 B, +2.4%) 8.7 KiB (+199 B, +2.3%)
truapi/generated/wire-decode.js 28.4 KiB (+657 B, +2.3%) 3.0 KiB (+54 B, +1.8%) 2.5 KiB (+38 B, +1.5%)
truapi-host/generated/host-callbacks.js 10.5 KiB (+399 B, +3.9%) 3.3 KiB (+122 B, +3.7%) 2.8 KiB (+113 B, +4.0%)
truapi/generated/wire-table.js 8.9 KiB (+188 B, +2.1%) 1.6 KiB (+20 B, +1.3%) 1.2 KiB (+3 B, +0.2%)
truapi-host/wasm/web/truapi_server.js 58.0 KiB (+3 B) 10.6 KiB 9.1 KiB (-30 B, -0.3%)

Commit: e3eeeb1

@github-actions

github-actions Bot commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

CI Status: 24 required jobs green, 22 passed and 2 skipped by path filter.

All job results
job result
android-bindings success
bundle-size success
changes success
changeset-guard success
cli-package success
codegen success
e2e skipped
explorer success
headless-install success
host-android-bindings success
host-android-detekt success
host-wasm success
ios-bindings success
ios-swift success
licenses success
playground success
provider-android-bindings success
release-guard success
rust success
ts-client success
ts-debugger success
ts-host success
wasm-provider success
workflow-lint skipped

Signing credentials: failure as of 2026-10-07, a release may fail

Commit e3eeeb1c · run log

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation javascript Pull requests that update javascript code rust Pull requests that update rust code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Land the funding core on main

1 participant